mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + kfence-defer-kfence_test_init-to-ensure-that-kunit-debugfs-is-created.patch added to -mm tree
@ 2021-07-14 22:37 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-14 22:37 UTC (permalink / raw)
  To: dvyukov, elver, glider, mm-commits, o451686892


The patch titled
     Subject: kfence: defer kfence_test_init to ensure that kunit debugfs is created
has been added to the -mm tree.  Its filename is
     kfence-defer-kfence_test_init-to-ensure-that-kunit-debugfs-is-created.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/kfence-defer-kfence_test_init-to-ensure-that-kunit-debugfs-is-created.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/kfence-defer-kfence_test_init-to-ensure-that-kunit-debugfs-is-created.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: Weizhao Ouyang <o451686892@gmail.com>
Subject: kfence: defer kfence_test_init to ensure that kunit debugfs is created

kfence_test_init and kunit_init both use the same level late_initcall,
which means if kfence_test_init linked ahead of kunit_init,
kfence_test_init will get a NULL debugfs_rootdir as parent dentry, then
kfence_test_init and kfence_debugfs_init both create a debugfs node named
"kfence" under debugfs_mount->mnt_root, and it will throw out "debugfs:
Directory 'kfence' with parent '/' already present!" with EEXIST.  So
kfence_test_init should be deferred.

Link: https://lkml.kernel.org/r/20210714113140.2949995-1-o451686892@gmail.com
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
Tested-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/kfence/kfence_test.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/kfence/kfence_test.c~kfence-defer-kfence_test_init-to-ensure-that-kunit-debugfs-is-created
+++ a/mm/kfence/kfence_test.c
@@ -852,7 +852,7 @@ static void kfence_test_exit(void)
 	tracepoint_synchronize_unregister();
 }
 
-late_initcall(kfence_test_init);
+late_initcall_sync(kfence_test_init);
 module_exit(kfence_test_exit);
 
 MODULE_LICENSE("GPL v2");
_

Patches currently in -mm which might be from o451686892@gmail.com are

kfence-defer-kfence_test_init-to-ensure-that-kunit-debugfs-is-created.patch


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

only message in thread, other threads:[~2021-07-14 22:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 22:37 + kfence-defer-kfence_test_init-to-ensure-that-kunit-debugfs-is-created.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).