diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 5b3559cb1d82..bebf58464d66 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4772,7 +4772,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);