Commit 9dcdb6ef authored by Anton Blanchard's avatar Anton Blanchard

[NET]: Add missing memory barriors for __LINK_STATE_RX_SCHED handling.

parent 395ab5d6
...@@ -258,6 +258,7 @@ static inline void __netif_rx_complete(struct net_device *dev) ...@@ -258,6 +258,7 @@ static inline void __netif_rx_complete(struct net_device *dev)
{ {
if (!test_bit(__LINK_STATE_RX_SCHED, &dev->state)) BUG(); if (!test_bit(__LINK_STATE_RX_SCHED, &dev->state)) BUG();
list_del(&dev->poll_list); list_del(&dev->poll_list);
smp_mb__before_clear_bit();
clear_bit(__LINK_STATE_RX_SCHED, &dev->state); clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
} }
......
...@@ -820,6 +820,7 @@ static inline void netif_rx_complete(struct net_device *dev) ...@@ -820,6 +820,7 @@ static inline void netif_rx_complete(struct net_device *dev)
local_irq_save(flags); local_irq_save(flags);
if (!test_bit(__LINK_STATE_RX_SCHED, &dev->state)) BUG(); if (!test_bit(__LINK_STATE_RX_SCHED, &dev->state)) BUG();
list_del(&dev->poll_list); list_del(&dev->poll_list);
smp_mb__before_clear_bit();
clear_bit(__LINK_STATE_RX_SCHED, &dev->state); clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
local_irq_restore(flags); local_irq_restore(flags);
} }
......
...@@ -1657,6 +1657,7 @@ static int process_backlog(struct net_device *backlog_dev, int *budget) ...@@ -1657,6 +1657,7 @@ static int process_backlog(struct net_device *backlog_dev, int *budget)
*budget -= work; *budget -= work;
list_del(&backlog_dev->poll_list); list_del(&backlog_dev->poll_list);
smp_mb__before_clear_bit();
clear_bit(__LINK_STATE_RX_SCHED, &backlog_dev->state); clear_bit(__LINK_STATE_RX_SCHED, &backlog_dev->state);
if (queue->throttle) { if (queue->throttle) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment