Patch "mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-sysctl-fix-missing-numa_stat-when-config_hugetlb_.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 286cc37d1937a13a1c8c80e69bda987a8538d37a
Author: Muchun Song <songmuchun@xxxxxxxxxxxxx>
Date:   Thu Jun 9 18:40:32 2022 +0800

    mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE
    
    [ Upstream commit 43b5240ca6b33108998810593248186b1e3ae34a ]
    
    "numa_stat" should not be included in the scope of CONFIG_HUGETLB_PAGE, if
    CONFIG_HUGETLB_PAGE is not configured even if CONFIG_NUMA is configured,
    "numa_stat" is missed form /proc. Move it out of CONFIG_HUGETLB_PAGE to
    fix it.
    
    Fixes: 4518085e127d ("mm, sysctl: make NUMA stats configurable")
    Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
    Cc: <stable@xxxxxxxxxxxxxxx>
    Acked-by: Michal Hocko <mhocko@xxxxxxxx>
    Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f165ea67dd33..c42ba2d669dc 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2466,6 +2466,17 @@ static struct ctl_table vm_table[] = {
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_TWO_HUNDRED,
 	},
+#ifdef CONFIG_NUMA
+	{
+		.procname	= "numa_stat",
+		.data		= &sysctl_vm_numa_stat,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= sysctl_vm_numa_stat_handler,
+		.extra1		= SYSCTL_ZERO,
+		.extra2		= SYSCTL_ONE,
+	},
+#endif
 #ifdef CONFIG_HUGETLB_PAGE
 	{
 		.procname	= "nr_hugepages",
@@ -2482,15 +2493,6 @@ static struct ctl_table vm_table[] = {
 		.mode           = 0644,
 		.proc_handler   = &hugetlb_mempolicy_sysctl_handler,
 	},
-	{
-		.procname		= "numa_stat",
-		.data			= &sysctl_vm_numa_stat,
-		.maxlen			= sizeof(int),
-		.mode			= 0644,
-		.proc_handler	= sysctl_vm_numa_stat_handler,
-		.extra1			= SYSCTL_ZERO,
-		.extra2			= SYSCTL_ONE,
-	},
 #endif
 	 {
 		.procname	= "hugetlb_shm_group",



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux