drivers/message/i2o/i2o_config.c: fix deadlock in compat_ioctl(I2OGETIOPS)
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Mon, 10 Feb 2014 22:25:35 +0000 (14:25 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Feb 2014 00:01:40 +0000 (16:01 -0800)
commita3eb7fbb41eb8d6e22d491741b8c5d5aa6cb069a
treee82b1ed3c523ba903a104ad4e6f6f09fd76dd314
parent3cf8ca1c250d3c3d8bf61f20bd71acd1876bf777
drivers/message/i2o/i2o_config.c: fix deadlock in compat_ioctl(I2OGETIOPS)

i2o_cfg_compat_ioctl(I2OGETIOPS) locks i2o_cfg_mutex and then calls
i2o_cfg_ioctl(I2OGETIOPS) that locks i2o_cfg_mutex as well.  A deadlock
is guaranteed.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/message/i2o/i2o_config.c