This is a note to let you know that I've just added the patch titled sysctl: clarify register_sysctl_init() base directory order to the 6.2-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: sysctl-clarify-register_sysctl_init-base-directory-order.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 228b09de936395ddd740df3522ea35ae934830d8 Mon Sep 17 00:00:00 2001 From: Luis Chamberlain <mcgrof@xxxxxxxxxx> Date: Thu, 2 Mar 2023 12:28:18 -0800 Subject: sysctl: clarify register_sysctl_init() base directory order From: Luis Chamberlain <mcgrof@xxxxxxxxxx> commit 228b09de936395ddd740df3522ea35ae934830d8 upstream. Relatively new docs which I added which hinted the base directories needed to be created before is wrong, remove that incorrect comment. This has been hinted before by Eric twice already [0] [1], I had just not verified that until now. Now that I've verified that updates the docs to relax the context described. [0] https://lkml.kernel.org/r/875ys0azt8.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [1] https://lkml.kernel.org/r/87ftbiud6s.fsf@xxxxxxxxxxxxxxxxxxxxx Cc: stable@xxxxxxxxxxxxxxx # v5.17 Cc: Christian Brauner <brauner@xxxxxxxxxx> Cc: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> Suggested-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx> Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/proc/proc_sysctl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -1445,10 +1445,7 @@ EXPORT_SYMBOL(register_sysctl); * register_sysctl() failing on init are extremely low, and so for both reasons * this function does not return any error as it is used by initialization code. * - * Context: Can only be called after your respective sysctl base path has been - * registered. So for instance, most base directories are registered early on - * init before init levels are processed through proc_sys_init() and - * sysctl_init_bases(). + * Context: if your base directory does not exist it will be created for you. */ void __init __register_sysctl_init(const char *path, struct ctl_table *table, const char *table_name) Patches currently in stable-queue which might be from mcgrof@xxxxxxxxxx are queue-6.2/sysctl-clarify-register_sysctl_init-base-directory-order.patch queue-6.2/proc_sysctl-enhance-documentation.patch queue-6.2/proc_sysctl-update-docs-for-__register_sysctl_table.patch