aboutsummaryrefslogtreecommitdiff
path: root/ui/x_keymap.c
diff options
context:
space:
mode:
authorzuoboqun <zuoboqun@baidu.com>2024-11-15 16:03:12 +0800
committerMichael S. Tsirkin <mst@redhat.com>2024-11-26 16:35:51 -0500
commit16f6804c460109e8b126cc710a0072f9f83bd230 (patch)
tree6080d7e57063f72a32d407fea7ebe0950157d3db /ui/x_keymap.c
parent34754a3a627e1937be7f3daaa0c5e73d91c7d9b5 (diff)
vhost_net: fix assertion triggered by batch of host notifiers processing
When the backend of vhost_net restarts during the vm is running, vhost_net is stopped and started. The virtio_device_grab_ioeventfd() fucntion in vhost_net_enable_notifiers() will result in a call to virtio_bus_set_host_notifier()(assign=false). And now virtio_device_grab_ioeventfd() is batched in a single transaction with virtio_bus_set_host_notifier()(assign=true). This triggers the following assertion: kvm_mem_ioeventfd_del: error deleting ioeventfd: Bad file descriptor This patch moves virtio_device_grab_ioeventfd() out of the batch to fix this problem. To be noted that the for loop to release ioeventfd should start from i+1, not i, because the i-th ioeventfd has already been released in vhost_dev_disable_notifiers_nvqs(). Fixes: 6166799f6 ("vhost_net: configure all host notifiers in a single MR transaction") Signed-off-by: Zuo Boqun <zuoboqun@baidu.com> Reported-by: Gao Shiyuan <gaoshiyuan@baidu.com> Message-Id: <20241115080312.3184-1-zuoboqun@baidu.com> Acked-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'ui/x_keymap.c')
0 files changed, 0 insertions, 0 deletions