mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
vhost_net: stop device during reset owner
[ Upstream commit4cd879515d] We don't stop device before reset owner, this means we could try to serve any virtqueue kick before reset dev->worker. This will result a warn since the work was pending at llist during owner resetting. Fix this by stopping device during owner reset. Reported-by: syzbot+eb17c6162478cc50632c@syzkaller.appspotmail.com Fixes:3a4d5c94e9("vhost_net: a kernel-level virtio server") Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ee46a86142
commit
73adb3b74e
@@ -1078,6 +1078,7 @@ static long vhost_net_reset_owner(struct vhost_net *n)
|
||||
}
|
||||
vhost_net_stop(n, &tx_sock, &rx_sock);
|
||||
vhost_net_flush(n);
|
||||
vhost_dev_stop(&n->dev);
|
||||
vhost_dev_reset_owner(&n->dev, umem);
|
||||
vhost_net_vq_reset(n);
|
||||
done:
|
||||
|
||||
Reference in New Issue
Block a user