]> git.baikalelectronics.ru Git - kernel.git/commit
sample: vfio-mdev: avoid deadlock in mdev_access()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 6 Jul 2018 20:50:06 +0000 (23:50 +0300)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 11 Jul 2018 19:22:41 +0000 (13:22 -0600)
commit29342ef3df40ba02b9c7f91d67c9f2b23783db8f
tree43bdf27e23afef2d4c07e184372a979c3910ef7d
parentabd538bfb9f56fa7ad0f47c833978152205fa3f9
sample: vfio-mdev: avoid deadlock in mdev_access()

mdev_access() calls mbochs_get_page() with mdev_state->ops_lock held,
while mbochs_get_page() locks the mutex by itself.
It leads to unavoidable deadlock.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
samples/vfio-mdev/mbochs.c