summaryrefslogtreecommitdiff
path: root/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
diff options
context:
space:
mode:
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>2018-04-30 12:14:09 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-05-06 17:53:32 +0100
commitca4c8fc97e669d7464a95e006d0ca4eadfa4e4bc (patch)
tree3de42f737db4db863967a4e868f2650bc7d4a98f /drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
parent3b37c41f0e56aff080d7a5a7f2adae34faa5a325 (diff)
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: 68cd6e5b206b ("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>
Diffstat (limited to 'drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h')
0 files changed, 0 insertions, 0 deletions