Skip to content

Commit

Permalink
[NET]: Add memory barrrier to netif_poll_enable()
Browse files Browse the repository at this point in the history
When a driver writer calls this, they generally expect that
all previous stores and modifications they've made will be
visible before netif_poll_enable() executes, so ensure this.

Noticed by Ben H.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Dec 31, 2006
1 parent bfff6e9 commit e44c39b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ static inline void netif_poll_disable(struct net_device *dev)

static inline void netif_poll_enable(struct net_device *dev)
{
smp_mb__before_clear_bit();
clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
}

Expand Down

0 comments on commit e44c39b

Please sign in to comment.