From e1afc0992140bea385c76f751a5728e2ac321b1d Mon Sep 17 00:00:00 2001 From: Haiyang Zhang Date: Thu, 1 Sep 2011 12:19:42 -0700 Subject: staging: hv: fix a kernel warning in netvsc_linkstatus_callback() commit c4b6a2eaf1c14810a4803d658f68614365978738 upstream. netif_notify_peers() caused a kernel warning in netvsc_linkstatus_callback(), because netvsc_linkstatus_callback() is within IRQ context. So we move the first call to netif_notify_peers() into queued work as well, but with zero delay. In addition to "staging-next", this should also be back-ported to stable kernels 2.6.32 and later. Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging') diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 61989f0d9f0d..88d519359e6b 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -217,8 +217,8 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj, if (status == 1) { netif_carrier_on(net); netif_wake_queue(net); - netif_notify_peers(net); ndev_ctx = netdev_priv(net); + schedule_delayed_work(&ndev_ctx->dwork, 0); schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20)); } else { netif_carrier_off(net); -- cgit v1.2.3