Files
linux-stable-mirror/lib
Ran Xiaokai 77bcee8d40 alloc_tag: fix rw permission issue when handling boot parameter
Boot parameters prefixed with "sysctl." are processed during the final
stage of system initialization via kernel_init()-> do_sysctl_args().  When
CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled, the sysctl.vm.mem_profiling
entry is not writable and will cause a warning.

Before run_init_process(), system initialization executes in kernel thread
context.  Use current->mm to distinguish sysctl writes during
do_sysctl_args() from user-space triggered ones.

And when the proc_handler is from do_sysctl_args(), always return success
because the same value was already set by setup_early_mem_profiling() and
this eliminates a permission denied warning.

Link: https://lkml.kernel.org/r/20260115031536.164254-1-ranxiaokai627@163.com
Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Suggested-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Suren Baghdasaryan <surenb@google.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-01-31 14:22:37 -08:00
..
2025-03-16 22:30:49 -07:00
2025-04-11 17:32:38 -07:00
2025-04-11 17:32:37 -07:00
2024-07-12 16:39:53 -07:00
2026-01-11 06:09:11 -10:00
2025-07-08 19:11:57 -04:00
2025-01-12 20:21:15 -08:00
2025-01-14 19:45:35 +01:00
2025-10-24 21:39:27 +02:00
2024-10-14 16:33:24 -05:00
2026-01-11 06:09:11 -10:00
2025-03-17 12:17:00 -07:00
2025-11-27 14:24:30 -08:00
2025-03-25 10:18:31 -03:00
2024-12-09 13:48:29 -08:00
2025-09-13 16:54:46 -07:00