Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932277Ab1FQOnA (ORCPT ); Fri, 17 Jun 2011 10:43:00 -0400 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:33650 "HELO p3plsmtps2ded03-01.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932253Ab1FQOm5 (ORCPT ); Fri, 17 Jun 2011 10:42:57 -0400 From: Haiyang Zhang To: haiyangz@microsoft.com, hjanssen@microsoft.com, kys@microsoft.com, v-abkane@microsoft.com, gregkh@suse.de, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, virtualization@lists.osdl.org Cc: stable Subject: [PATCH 5/5] staging: hv: fix a kernel warning in netvsc_linkstatus_callback() Date: Fri, 17 Jun 2011 07:58:08 -0700 Message-Id: <1308322688-9796-5-git-send-email-haiyangz@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308322688-9796-1-git-send-email-haiyangz@microsoft.com> References: <1308322688-9796-1-git-send-email-haiyangz@microsoft.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1356 Lines: 36 netif_notify_peers() is not allowed in netvsc_linkstatus_callback() on some distros, 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. 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 Cc: stable --- drivers/staging/hv/netvsc_drv.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index c9ed19a..2299b88 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -216,8 +216,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); -- 1.6.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/