aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorJohannes Weiner <[email protected]>2009-03-10 21:44:01 +0000
committerJiri Kosina <[email protected]>2009-03-10 21:44:01 +0000
commit96fe2ab830d7dffee1b3d8abf27ced4d7d5765e7 (patch)
treef59b1549ecf9fe5e2c5adafc77d16aa36942e07d /net/unix/af_unix.c
parentHID: fix incorrect free in hiddev (diff)
downloadkernel-96fe2ab830d7dffee1b3d8abf27ced4d7d5765e7.tar.gz
kernel-96fe2ab830d7dffee1b3d8abf27ced4d7d5765e7.zip
HID: fix waitqueue usage in hiddev
DECLARE_WAITQUEUE doesn't initialize the wait descriptor's task_list to 'empty' but to zero. prepare_to_wait() will not enqueue the descriptor to the waitqueue and finish_wait() will do list_del_init() on a list head that contains NULL pointers, which oopses. This was introduced by 079034073 "HID: hiddev cleanup -- handle all error conditions properly". The prior code used an unconditional add_to_waitqueue() which didn't care about the wait descriptor's list head and enqueued the thing unconditionally. The new code uses prepare_to_wait() which DOES check the prior list state, so use DEFINE_WAIT instead. Signed-off-by: Johannes Weiner <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Jiri Kosina <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions