OSDN Git Service

vduse: Cleanup the old kernel states after reset failure
authorXie Yongji <xieyongji@bytedance.com>
Mon, 6 Sep 2021 14:21:58 +0000 (22:21 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Sep 2021 22:10:43 +0000 (18:10 -0400)
commit7bb5fb207334758ce6ee84345d6f08e4fb284fe6
tree8d5e6f2172db7f33f1e6a9ff50ef987b0d099a75
parent6243e3c78ace66d337a1e43b60a1aa8f5b61bd72
vduse: Cleanup the old kernel states after reset failure

We should cleanup the old kernel states e.g. interrupt callback
no matter whether the userspace handle the reset correctly or not
since virtio-vdpa can't handle the reset failure now.

Otherwise, the old state might be used after reset which might
break something, e.g. the old interrupt callback might be triggered
by userspace after reset, which can break the virtio device driver.

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Link: https://lore.kernel.org/r/20210906142158.181-1-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/vdpa/vdpa_user/vduse_dev.c