This is a note to let you know that I've just added the patch titled
virtio-net: refill only when device is up during setting queues
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
virtio-net-refill-only-when-device-is-up-during-setting-queues.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 5335e0d9c3736ef6fa59412d0ebe1cee855da925 Mon Sep 17 00:00:00 2001
From: Jason Wang <[email protected]>
Date: Tue, 15 Oct 2013 11:18:59 +0800
Subject: virtio-net: refill only when device is up during setting queues
From: Jason Wang <[email protected]>
[ Upstream commit 35ed159bfd96a7547ec277ed8b550c7cbd9841b6 ]
We used to schedule the refill work unconditionally after changing the
number of queues. This may lead an issue if the device is not
up. Since we only try to cancel the work in ndo_stop(), this may cause
the refill work still work after removing the device. Fix this by only
schedule the work when device is up.
The bug were introduce by commit 9b9cd8024a2882e896c65222aa421d461354e3f2.
(virtio-net: fix the race between channels setting and refill)
Signed-off-by: Jason Wang <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/net/virtio_net.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -916,7 +916,9 @@ static int virtnet_set_queues(struct vir
return -EINVAL;
} else {
vi->curr_queue_pairs = queue_pairs;
- schedule_delayed_work(&vi->refill, 0);
+ /* virtnet_open() will refill when device is going to up. */
+ if (dev->flags & IFF_UP)
+ schedule_delayed_work(&vi->refill, 0);
}
return 0;
@@ -1714,7 +1716,9 @@ static int virtnet_restore(struct virtio
vi->config_enable = true;
mutex_unlock(&vi->config_lock);
+ rtnl_lock();
virtnet_set_queues(vi, vi->curr_queue_pairs);
+ rtnl_unlock();
return 0;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/virtio-net-fix-the-race-between-channels-setting-and-refill.patch
queue-3.10/virtio-net-refill-only-when-device-is-up-during-setting-queues.patch
queue-3.10/virtio-net-don-t-respond-to-cpu-hotplug-notifier-if-we-re-not-ready.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html