summaryrefslogtreecommitdiff
path: root/lib/sys_info.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2025-08-20 18:39:46 +0200
committerAndrew Morton <akpm@linux-foundation.org>2025-09-13 17:32:49 -0700
commitf7071db2fe3d20991a35043b32012e1b37d32cc0 (patch)
tree1dc6afefab33a004385196386ffa71568fa25f5c /lib/sys_info.c
parentb32730e68d326bef5c081c4b7cdd275c45b1902b (diff)
fork: kill the pointless lower_32_bits() in create_io_thread(), kernel_thread(), and user_mode_thread()
Unlike sys_clone(), these helpers have only in kernel users which should pass the correct "flags" argument. lower_32_bits(flags) just adds the unnecessary confusion and doesn't allow to use the CLONE_ flags which don't fit into 32 bits. create_io_thread() looks especially confusing because: - "flags" is a compile-time constant, so lower_32_bits() simply has no effect - .exit_signal = (lower_32_bits(flags) & CSIGNAL) is harmless but doesn't look right, copy_process(CLONE_THREAD) will ignore this argument anyway. None of these helpers actually need CLONE_UNTRACED or "& ~CSIGNAL", but their presence does not add any confusion and improves code clarity. Link: https://lkml.kernel.org/r/20250820163946.GA18549@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Jens Axboe <axboe@kernel.dk> Cc: Christian Brauner <brauner@kernel.org> Cc: Kees Cook <kees@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/sys_info.c')
0 files changed, 0 insertions, 0 deletions