All of lore.kernel.org
 help / color / mirror / Atom feed
* + fs-file_table-fix-adding-missing-kmemleak_not_leak.patch added to -mm tree
@ 2022-02-16  0:51 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-02-16  0:51 UTC (permalink / raw)
  To: mm-commits, ztong0001, mcgrof, akpm


The patch titled
     Subject: fs/file_table: fix adding missing kmemleak_not_leak()
has been added to the -mm tree.  Its filename is
     fs-file_table-fix-adding-missing-kmemleak_not_leak.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/fs-file_table-fix-adding-missing-kmemleak_not_leak.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/fs-file_table-fix-adding-missing-kmemleak_not_leak.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Luis Chamberlain <mcgrof@kernel.org>
Subject: fs/file_table: fix adding missing kmemleak_not_leak()

Commit b42bc9a3c511 ("Fix regression due to "fs: move binfmt_misc sysctl
to its own file") fixed a regression, however it failed to add a
kmemleak_not_leak().

Link: https://lkml.kernel.org/r/20220215020828.4180911-1-mcgrof@kernel.org
Fixes: b42bc9a3c511 ("Fix regression due to "fs: move binfmt_misc sysctl to its own file")
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reported-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/file_table.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/fs/file_table.c~fs-file_table-fix-adding-missing-kmemleak_not_leak
+++ a/fs/file_table.c
@@ -27,6 +27,7 @@
 #include <linux/task_work.h>
 #include <linux/ima.h>
 #include <linux/swap.h>
+#include <linux/kmemleak.h>
 
 #include <linux/atomic.h>
 
@@ -119,8 +120,11 @@ static struct ctl_table fs_stat_sysctls[
 static int __init init_fs_stat_sysctls(void)
 {
 	register_sysctl_init("fs", fs_stat_sysctls);
-	if (IS_ENABLED(CONFIG_BINFMT_MISC))
-		register_sysctl_mount_point("fs/binfmt_misc");
+	if (IS_ENABLED(CONFIG_BINFMT_MISC)) {
+		struct ctl_table_header *hdr;
+		hdr = register_sysctl_mount_point("fs/binfmt_misc");
+		kmemleak_not_leak(hdr);
+	}
 	return 0;
 }
 fs_initcall(init_fs_stat_sysctls);
_

Patches currently in -mm which might be from mcgrof@kernel.org are

fs-file_table-fix-adding-missing-kmemleak_not_leak.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-16  0:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-16  0:51 + fs-file_table-fix-adding-missing-kmemleak_not_leak.patch added to -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.