From: Haiyang Zhang <haiyangz@microsoft.com>
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 <stable@kernel.org>
Subject: [PATCH 5/5] staging: hv: fix a kernel warning in netvsc_linkstatus_callback()
Date: Fri, 17 Jun 2011 07:58:08 -0700 [thread overview]
Message-ID: <1308322688-9796-5-git-send-email-haiyangz@microsoft.com> (raw)
In-Reply-To: <1308322688-9796-1-git-send-email-haiyangz@microsoft.com>
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 <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: stable <stable@kernel.org>
---
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
next prev parent reply other threads:[~2011-06-17 14:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 14:58 [PATCH 1/5] staging: hv: fix some white spaces in netvsc driver Haiyang Zhang
2011-06-17 14:58 ` [PATCH 2/5] staging: hv: remove unnecessary includes in netvsc Haiyang Zhang
2011-06-17 14:58 ` [PATCH 3/5] staging: hv: add newline to log messages " Haiyang Zhang
2011-06-17 14:58 ` [PATCH 4/5] staging: hv: convert dev_<loglevel> to netdev_<loglevel> " Haiyang Zhang
2011-06-17 14:58 ` Haiyang Zhang [this message]
2011-07-05 16:10 ` [PATCH 5/5] staging: hv: fix a kernel warning in netvsc_linkstatus_callback() Greg KH
2011-07-05 18:45 ` Haiyang Zhang
2011-06-17 16:03 ` [PATCH 1/5] staging: hv: fix some white spaces in netvsc driver Nicolas Kaiser
2011-06-17 16:43 ` Haiyang Zhang
2011-07-05 16:11 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308322688-9796-5-git-send-email-haiyangz@microsoft.com \
--to=haiyangz@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@suse.de \
--cc=hjanssen@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--cc=v-abkane@microsoft.com \
--cc=virtualization@lists.osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®