linux-hardened/drivers/iio
Jean-Baptiste Maneyrol ca4c8fc97e iio: imu: inv_mpu6050: fix possible deadlock between mutex and iio
Detected by kernel circular locking dependency checker.

We are locking iio mutex (iio_device_claim_direct_mode) after
locking our internal mutex. But when the buffer starts, iio first
locks its mutex and then we lock our internal one.

To avoid possible deadlock, we need to use the same order
everwhere. So we change the ordering by locking first iio mutex,
then our internal mutex.

Fixes: 68cd6e5b20 ("iio: imu: inv_mpu6050: fix lock issues by using our own mutex")
Cc: stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-05-06 17:53:32 +01:00
..
accel iio: accel: bcm150: Remove handling for regmap raw_read_max 2018-04-28 17:01:55 +01:00
adc iio: adc: stm32-dfsdm: add check on spi-max-frequency 2018-04-28 16:17:59 +01:00
afe iio: afe: rescale: new driver 2018-04-28 18:03:22 +01:00
amplifiers iio:amplifiers:ad8366 drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:24:50 +01:00
buffer vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
chemical iio: chemical: atlas-ph-sensor: use msleep() for long uncritical delays 2018-04-15 18:37:26 +01:00
common iio: common: hid-sensors: simplify getting .drvdata 2018-04-28 16:17:59 +01:00
counter iio: stm32: Adopt SPDX identifier 2018-01-08 16:03:41 +01:00
dac iio:dac:ad5686: Add AD5671R/75R/94/94R/95R/96/96R support 2018-04-15 19:39:48 +01:00
dummy iio:dummy: Add extra paragraphs on Kconfig 2018-03-03 15:20:16 +00:00
frequency iio:frequency: drop assign iio_info.driver_module 2017-08-22 21:28:20 +01:00
gyro iio: Replace occurrences of magic number 0 by IIO_CHAN_INFO_RAW 2018-03-07 20:14:36 +00:00
health iio: add SPDX identifier for various drivers 2018-02-18 11:55:19 +00:00
humidity iio: add SPDX identifier for various drivers 2018-02-18 11:55:19 +00:00
imu iio: imu: inv_mpu6050: fix possible deadlock between mutex and iio 2018-05-06 17:53:32 +01:00
light iio: cros_ec: Move cros_ec_sensors_core.h in /include 2018-03-17 19:59:20 +00:00
magnetometer iio:magnetometer: Replace magic number 0 by IIO_CHAN_INFO_RAW 2018-03-03 15:23:13 +00:00
multiplexer iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values 2017-09-03 18:10:29 +01:00
orientation iio:orientation: drop assign iio_info.driver_module 2017-08-22 21:33:36 +01:00
potentiometer iio: potentiometer: mcp4531: switch to using .probe_new 2018-04-15 18:12:51 +01:00
potentiostat iio: add SPDX identifier for various drivers 2018-02-18 11:55:19 +00:00
pressure iio: cros_ec: Move cros_ec_sensors_core.h in /include 2018-03-17 19:59:20 +00:00
proximity Second set of new device support, features and cleanup for IIO in the 4.17 cycle 2018-03-14 12:32:11 +01:00
temperature iio temperature/mlx90632: silence a static checker warning 2018-02-24 13:32:05 +00:00
trigger iio: stm32: Adopt SPDX identifier 2018-01-08 16:03:41 +01:00
iio_core.h the rest of drivers/*: annotate ->poll() instances 2017-11-28 11:06:58 -05:00
iio_core_trigger.h
industrialio-buffer.c First round of IIO fixes for the 4.16 cycle. 2018-02-20 10:03:22 +01:00
industrialio-configfs.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-core.c Merge Linus's staging merge point into staging-next 2017-12-06 15:27:17 +01:00
industrialio-event.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
industrialio-sw-device.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-sw-trigger.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-trigger.c iio:trigger: Remove necessity to have a trig->ops structure. 2017-08-22 21:20:28 +01:00
industrialio-triggered-event.c iio: Support triggered events 2015-08-27 20:47:09 +01:00
inkern.c IIO: inkern: API for manipulating channel attributes 2018-01-10 10:30:08 +00:00
Kconfig iio: afe: rescale: new driver 2018-04-28 18:03:22 +01:00
Makefile iio: afe: rescale: new driver 2018-04-28 18:03:22 +01:00