]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.1.1/staging-hv-fix-a-kernel-warning-in-netvsc_linkstatus_callback.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.1 / staging-hv-fix-a-kernel-warning-in-netvsc_linkstatus_callback.patch
CommitLineData
fa6bf050
GKH
1From c4b6a2eaf1c14810a4803d658f68614365978738 Mon Sep 17 00:00:00 2001
2From: Haiyang Zhang <haiyangz@microsoft.com>
3Date: Thu, 1 Sep 2011 12:19:42 -0700
4Subject: staging: hv: fix a kernel warning in netvsc_linkstatus_callback()
5
6From: Haiyang Zhang <haiyangz@microsoft.com>
7
8commit c4b6a2eaf1c14810a4803d658f68614365978738 upstream.
9
10netif_notify_peers() caused a kernel warning in netvsc_linkstatus_callback(),
11because netvsc_linkstatus_callback() is within IRQ context. So we move
12the first call to netif_notify_peers() into queued work as well, but with
13zero delay.
14
15In addition to "staging-next", this should also be back-ported to stable
16kernels 2.6.32 and later.
17
18Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
19Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21
22---
23 drivers/staging/hv/netvsc_drv.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26--- a/drivers/staging/hv/netvsc_drv.c
27+++ b/drivers/staging/hv/netvsc_drv.c
28@@ -217,8 +217,8 @@ void netvsc_linkstatus_callback(struct h
29 if (status == 1) {
30 netif_carrier_on(net);
31 netif_wake_queue(net);
32- netif_notify_peers(net);
33 ndev_ctx = netdev_priv(net);
34+ schedule_delayed_work(&ndev_ctx->dwork, 0);
35 schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
36 } else {
37 netif_carrier_off(net);