From: Jeff Moyer <jmoyer@redhat.com>
To: mpm@selenic.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: [patch 1/3] netpoll: set poll_owner to -1 before unlocking in netpoll_poll_unlock
Date: Wed, 22 Jun 2005 21:27:38 -0400 [thread overview]
Message-ID: <17082.4106.825017.811757@segfault.boston.redhat.com> (raw)
In-Reply-To: <17082.4037.875432.648439@segfault.boston.redhat.com>
Hi,
This trivial patch moves the assignment of poll_owner to -1 inside of the
lock. This fixes a potential SMP race in the code.
-Jeff
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
---
--- linux-2.6.12/include/linux/netpoll.h.orig 2005-06-22 18:47:12.917261688 -0400
+++ linux-2.6.12/include/linux/netpoll.h 2005-06-22 18:47:15.799783018 -0400
@@ -53,8 +53,8 @@ static inline void netpoll_poll_lock(str
static inline void netpoll_poll_unlock(struct net_device *dev)
{
if (dev->np) {
- spin_unlock(&dev->np->poll_lock);
dev->np->poll_owner = -1;
+ spin_unlock(&dev->np->poll_lock);
}
}
next prev parent reply other threads:[~2005-06-23 1:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-23 1:26 [patch 0/3] netpoll: support multiple netpoll clients per net_device Jeff Moyer
2005-06-23 1:27 ` Jeff Moyer [this message]
2005-06-23 1:30 ` [patch 2/3] netpoll: Introduce a netpoll_info struct Jeff Moyer
2005-06-23 1:30 ` [patch 3/3] netpoll: allow multiple netpoll_clients to register against one interface Jeff Moyer
2005-06-23 5:06 ` [patch 0/3] netpoll: support multiple netpoll clients per net_device David S. Miller
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=17082.4106.825017.811757@segfault.boston.redhat.com \
--to=jmoyer@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=netdev@vger.kernel.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