Messages in this thread Patch in this message | | | From | Jeff Moyer <> | Date | Wed, 22 Jun 2005 21:27:38 -0400 | Subject | [patch 1/3] netpoll: set poll_owner to -1 before unlocking in netpoll_poll_unlock |
| |
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); } } - 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/
| |