diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-05-25 11:24:42 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-05-25 11:24:42 -0700 |
| commit | cbb245239282870bc6f54d5137dfe0f84b48ea72 (patch) | |
| tree | dcdd8041d7bb5cddacfe086785dd370aa1a7a6ea /include/linux/skmsg.h | |
| parent | 94a332bd8626f6c32e7ba5835dd17eeddbb76e89 (diff) | |
| parent | 9f4ad9e425a1d3b6a34617b8ea226d56a119a717 (diff) | |
Merge tag 'v5.12' into next
Sync up with mainline to get the latest device tree bindings and kernel
APIs.
Diffstat (limited to 'include/linux/skmsg.h')
| -rw-r--r-- | include/linux/skmsg.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index 8edbbf5f2f93..822c048934e3 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -349,8 +349,13 @@ static inline void sk_psock_update_proto(struct sock *sk, static inline void sk_psock_restore_proto(struct sock *sk, struct sk_psock *psock) { - sk->sk_prot->unhash = psock->saved_unhash; if (inet_csk_has_ulp(sk)) { + /* TLS does not have an unhash proto in SW cases, but we need + * to ensure we stop using the sock_map unhash routine because + * the associated psock is being removed. So use the original + * unhash handler. + */ + WRITE_ONCE(sk->sk_prot->unhash, psock->saved_unhash); tcp_update_ulp(sk, psock->sk_proto, psock->saved_write_space); } else { sk->sk_write_space = psock->saved_write_space; |
