]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched: change wake_up_bit() and related function to expect unsigned long *
authorNeilBrown <neilb@suse.de>
Wed, 25 Sep 2024 05:31:38 +0000 (15:31 +1000)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 7 Oct 2024 07:28:37 +0000 (09:28 +0200)
commit2382d68d7d43873ba856baf567cab0d5c523f23b
tree866e8de95997bb3544f9406d9a5b4e6ddbed4a1b
parent8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b
sched: change wake_up_bit() and related function to expect unsigned long *

wake_up_bit() currently allows a "void *".  While this isn't strictly a
problem as the address is never dereferenced, it is inconsistent with
the corresponding wait_on_bit() which requires "unsigned long *" and
does dereference the pointer.

Any code that needs to wait for a change in something other than an
unsigned long would be better served by wake_up_var()/wait_var_event().

This patch changes all related "void *" to "unsigned long *".

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240925053405.3960701-2-neilb@suse.de
include/linux/wait_bit.h
kernel/sched/wait_bit.c