From 891ac8bc3a01c9db814538c7249dfeab6104275a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 7 Feb 2018 11:36:37 -0800 Subject: [PATCH] 3.18-stable patches added patches: vhost_net-stop-device-during-reset-owner.patch --- queue-3.18/series | 1 + ...t_net-stop-device-during-reset-owner.patch | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 queue-3.18/series create mode 100644 queue-3.18/vhost_net-stop-device-during-reset-owner.patch diff --git a/queue-3.18/series b/queue-3.18/series new file mode 100644 index 00000000000..ded9f9d8916 --- /dev/null +++ b/queue-3.18/series @@ -0,0 +1 @@ +vhost_net-stop-device-during-reset-owner.patch diff --git a/queue-3.18/vhost_net-stop-device-during-reset-owner.patch b/queue-3.18/vhost_net-stop-device-during-reset-owner.patch new file mode 100644 index 00000000000..0c4e6f3ee03 --- /dev/null +++ b/queue-3.18/vhost_net-stop-device-during-reset-owner.patch @@ -0,0 +1,34 @@ +From foo@baz Wed Feb 7 11:22:35 PST 2018 +From: Jason Wang +Date: Thu, 25 Jan 2018 22:03:52 +0800 +Subject: vhost_net: stop device during reset owner + +From: Jason Wang + + +[ 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 +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/vhost/net.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/vhost/net.c ++++ b/drivers/vhost/net.c +@@ -1009,6 +1009,7 @@ static long vhost_net_reset_owner(struct + } + vhost_net_stop(n, &tx_sock, &rx_sock); + vhost_net_flush(n); ++ vhost_dev_stop(&n->dev); + vhost_dev_reset_owner(&n->dev, memory); + vhost_net_vq_reset(n); + done: -- 2.47.2