1
0
Fork 0
remarkable-linux/drivers/vhost
Jason Wang bd3ccdc6f9 vhost: use mutex_lock_nested() in vhost_dev_lock_vqs()
commit e9cb423913 upstream.

We used to call mutex_lock() in vhost_dev_lock_vqs() which tries to
hold mutexes of all virtqueues. This may confuse lockdep to report a
possible deadlock because of trying to hold locks belong to same
class. Switch to use mutex_lock_nested() to avoid false positive.

Fixes: 6b1e6cc785 ("vhost: new device IOTLB API")
Reported-by: syzbot+dbb7c1161485e61b0241@syzkaller.appspotmail.com
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:39 +01:00
..
Kconfig vhost: split out vringh Kconfig 2016-08-02 16:54:28 +03:00
Kconfig.vringh vhost: split out vringh Kconfig 2016-08-02 16:54:28 +03:00
Makefile VSOCK: Add Makefile and Kconfig 2016-08-02 02:57:30 +03:00
net.c vhost_net: stop device during reset owner 2018-02-13 12:35:56 +01:00
scsi.c fix a page leak in vhost_scsi_iov_to_sgl() error recovery 2017-11-30 08:39:05 +00:00
test.c Merge 4.8-rc5 into char-misc-next 2016-09-05 08:04:07 +02:00
test.h vhost test module 2010-12-09 16:00:21 +02:00
vhost.c vhost: use mutex_lock_nested() in vhost_dev_lock_vqs() 2018-02-25 11:05:39 +01:00
vhost.h vhost: new device IOTLB API 2016-08-02 16:53:54 +03:00
vringh.c vringh: update for virtio 1.0 APIs 2014-12-15 23:49:28 +02:00
vsock.c vhost-vsock: add pkt cancel capability 2017-12-25 14:23:37 +01:00