mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
f31f5f0512
commit
6ca4f65e6b
1 changed files with 1 additions and 1 deletions
|
@ -53,8 +53,8 @@ static inline void netpoll_poll_lock(struct net_device *dev)
|
||||||
static inline void netpoll_poll_unlock(struct net_device *dev)
|
static inline void netpoll_poll_unlock(struct net_device *dev)
|
||||||
{
|
{
|
||||||
if (dev->np) {
|
if (dev->np) {
|
||||||
spin_unlock(&dev->np->poll_lock);
|
|
||||||
dev->np->poll_owner = -1;
|
dev->np->poll_owner = -1;
|
||||||
|
spin_unlock(&dev->np->poll_lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue