aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Moyer <jmoyer@redhat.com>2005-06-23 01:04:55 -0400
committerDavid S. Miller <davem@davemloft.net>2005-06-23 01:04:55 -0400
commit6ca4f65e6b390d09e1de7280cf9fd4f5d8e4b48b (patch)
tree1ca8b0d0126c5ce1cd7ffc0fe0ccd80235f3307b /include
parentf31f5f051269746179b01017fc5e3dcf6b37c67e (diff)
[NETPOLL]: Set poll_owner to -1 before unlocking in netpoll_poll_unlock()
This trivial patch moves the assignment of poll_owner to -1 inside of the lock. This fixes a potential SMP race in the code. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netpoll.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index c0d8b90c5202..449a4fde6587 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -53,8 +53,8 @@ static inline void netpoll_poll_lock(struct net_device *dev)
53static inline void netpoll_poll_unlock(struct net_device *dev) 53static inline void netpoll_poll_unlock(struct net_device *dev)
54{ 54{
55 if (dev->np) { 55 if (dev->np) {
56 spin_unlock(&dev->np->poll_lock);
57 dev->np->poll_owner = -1; 56 dev->np->poll_owner = -1;
57 spin_unlock(&dev->np->poll_lock);
58 } 58 }
59} 59}
60 60