]> git.baikalelectronics.ru Git - kernel.git/commit
vduse: Disallow injecting interrupt before DRIVER_OK is set
authorXie Yongji <xieyongji@bytedance.com>
Thu, 23 Sep 2021 07:57:22 +0000 (15:57 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 22 Oct 2021 10:49:14 +0000 (06:49 -0400)
commita8519484f2670ac71deeb2a094936ff9a9f6a2c2
treeb5c55dd49b3e3798d7c5af3bf4fe92fb784515ed
parent3d3ce94ad5eb198e70846c3331af2a1087cc5f4e
vduse: Disallow injecting interrupt before DRIVER_OK is set

The interrupt callback should not be triggered before DRIVER_OK
is set. Otherwise, it might break the virtio device driver.
So let's add a check to avoid the unexpected behavior.

Fixes: 365194a98d97 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Link: https://lore.kernel.org/r/20210923075722.98-1-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_user/vduse_dev.c