提交 6ca4f65e 编写于 作者: J Jeff Moyer 提交者: David S. Miller

[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: NJeff Moyer <jmoyer@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f31f5f05
......@@ -53,8 +53,8 @@ static inline void netpoll_poll_lock(struct net_device *dev)
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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册