From: Marco Elver <elver@google.com>
To: Weizhao Ouyang <o451686892@gmail.com>
Cc: glider@google.com, dvyukov@google.com, akpm@linux-foundation.org,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kfence: defer kfence_test_init to ensure that kunit debugfs is created
Date: Wed, 14 Jul 2021 13:56:20 +0200 [thread overview]
Message-ID: <CANpmjNMe+wyuFLJ0nOk-4Sr57GgBf6VuHa3hmsVUZYJ1gjuC5A@mail.gmail.com> (raw)
In-Reply-To: <20210714113140.2949995-1-o451686892@gmail.com>
On Wed, 14 Jul 2021 at 13:31, Weizhao Ouyang <o451686892@gmail.com> wrote:
> 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.
>
> Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
Tested-by: Marco Elver <elver@google.com>
Thank you.
> ---
> mm/kfence/kfence_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c
> index 7f24b9bcb2ec..942cbc16ad26 100644
> --- a/mm/kfence/kfence_test.c
> +++ b/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");
> --
> 2.30.2
prev parent reply other threads:[~2021-07-14 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 11:31 Weizhao Ouyang
2021-07-14 11:56 ` Marco Elver [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANpmjNMe+wyuFLJ0nOk-4Sr57GgBf6VuHa3hmsVUZYJ1gjuC5A@mail.gmail.com \
--to=elver@google.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=o451686892@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox