OSDN Git Service

vhost_net: stop device during reset owner
authorJason Wang <jasowang@redhat.com>
Thu, 25 Jan 2018 14:03:52 +0000 (22:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Feb 2018 09:19:47 +0000 (10:19 +0100)
commitb9b70c876a7a73d494cb9d9f32a227dcfac54a4c
treee09853bd3ae799640aa2b5748e0a878b62f26639
parent6d35430fdaf47880cacda975a7d1b1588f933357
vhost_net: stop device during reset owner

[ Upstream commit 4cd879515d686849eec5f718aeac62a70b067d82 ]

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: 3a4d5c94e9593 ("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>
drivers/vhost/net.c