diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c623c129d0ab6fce1f4685759baf02890b4cda82..e0be1f8651bbe684012f37bd0abd40ff2dadd1a1 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4377,7 +4377,7 @@ static bool skb_may_tx_timestamp(struct sock *sk, bool tsonly) { bool ret; - if (likely(sysctl_tstamp_allow_data || tsonly)) + if (likely(READ_ONCE(sysctl_tstamp_allow_data) || tsonly)) return true; read_lock_bh(&sk->sk_callback_lock);