Message ID | 20240927122321.34030-2-massimiliano.pellizzer@canonical.com |
---|---|
State | New |
Headers | show |
Series | CVE-2024-36938 | expand |
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index 613d04526032..e1e276994807 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -440,10 +440,12 @@ static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock) static inline void sk_psock_data_ready(struct sock *sk, struct sk_psock *psock) { + read_lock_bh(&sk->sk_callback_lock); if (psock->parser.enabled) psock->parser.saved_data_ready(sk); else sk->sk_data_ready(sk); + read_unlock_bh(&sk->sk_callback_lock); } static inline void psock_set_prog(struct bpf_prog **pprog,