linux/net/rfkill
Johannes Berg 6736fde967 rfkill: fix rfkill_fop_read wait_event usage
The code within wait_event_interruptible() is called with
!TASK_RUNNING, so mustn't call any functions that can sleep,
like mutex_lock().

Since we re-check the list_empty() in a loop after the wait,
it's safe to simply use list_empty() without locking.

This bug has existed forever, but was only discovered now
because all userspace implementations, including the default
'rfkill' tool, use poll() or select() to get a readable fd
before attempting to read.

Cc: stable@vger.kernel.org
Fixes: c64fb01627 ("rfkill: create useful userspace interface")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-01-26 11:32:05 +01:00
..
Kconfig rfkill: Allow compile test of GPIO consumers if !GPIOLIB 2015-08-13 10:48:52 +02:00
Makefile net: rfkill: add generic gpio rfkill driver 2011-05-19 13:53:54 -04:00
core.c rfkill: fix rfkill_fop_read wait_event usage 2016-01-26 11:32:05 +01:00
input.c rfkill: don't use [delayed_]work_pending() 2012-12-28 13:40:16 -08:00
rfkill-gpio.c Bluetooth: hci_bcm: move all Broadcom ACPI IDs to BCM HCI driver 2016-01-04 19:22:05 +01:00
rfkill-regulator.c net: rfkill: drop owner assignment from platform_drivers 2014-10-20 16:21:58 +02:00
rfkill.h rfkill: rewrite 2009-06-03 14:06:13 -04:00