diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/skmsg.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index d90ef61..112765b 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -352,7 +352,8 @@ static inline void sk_psock_update_proto(struct sock *sk, psock->saved_write_space = sk->sk_write_space; psock->sk_proto = sk->sk_prot; - sk->sk_prot = ops; + /* Pairs with lockless read in sk_clone_lock() */ + WRITE_ONCE(sk->sk_prot, ops); } static inline void sk_psock_restore_proto(struct sock *sk, |