Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: panel: fix interruptible_sleep_on race

interruptible_sleep_on is racy and going away. This replaces the one
caller in the panel driver with the appropriate wait_event_interruptible
variant.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: devel@driverdev.osuosl.org
Cc: Willy Tarreau <willy@meta-x.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arnd Bergmann and committed by
Greg Kroah-Hartman
310df69c baeae584

+2 -2
+2 -2
drivers/staging/panel/panel.c
··· 1590 1590 if (file->f_flags & O_NONBLOCK) 1591 1591 return -EAGAIN; 1592 1592 1593 - interruptible_sleep_on(&keypad_read_wait); 1594 - if (signal_pending(current)) 1593 + if (wait_event_interruptible(keypad_read_wait, 1594 + keypad_buflen != 0)) 1595 1595 return -EINTR; 1596 1596 } 1597 1597