From: David S. Miller Date: Fri, 29 Dec 2006 05:14:52 +0000 (-0800) Subject: [NET]: Add memory barrrier to netif_poll_enable() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e44c39bd8478bf9e41cbc611c74b5879a7b29f58;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [NET]: Add memory barrrier to netif_poll_enable() 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 --- diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 6be767c76b37..fea0d9db6846 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -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); }