From: Arnd Bergmann Date: Thu, 2 Jan 2014 12:07:35 +0000 (+0100) Subject: staging: panel: fix interruptible_sleep_on race X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=310df69c26f93c49bb176e95e4eb42ece58a5fd2;p=openwrt%2Fstaging%2Fblogic.git 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 Cc: devel@driverdev.osuosl.org Cc: Willy Tarreau Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index cbc15c120981..ec4b1fd14021 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -1590,8 +1590,8 @@ static ssize_t keypad_read(struct file *file, if (file->f_flags & O_NONBLOCK) return -EAGAIN; - interruptible_sleep_on(&keypad_read_wait); - if (signal_pending(current)) + if (wait_event_interruptible(keypad_read_wait, + keypad_buflen != 0)) return -EINTR; }