diff options
| author | Jakub Kicinski <[email protected]> | 2023-12-01 00:10:40 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-12-01 00:11:19 +0000 |
| commit | 975f2d73a99f35b57ffa2ad7bff8562225cdcfcb (patch) | |
| tree | d6c9ce96cfd889281e003a310c79d5a12a3cf924 /net/unix/unix_bpf.c | |
| parent | net: page_pool: fix general protection fault in page_pool_unlist (diff) | |
| parent | Merge tag 'net-6.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff) | |
| download | kernel-975f2d73a99f35b57ffa2ad7bff8562225cdcfcb.tar.gz kernel-975f2d73a99f35b57ffa2ad7bff8562225cdcfcb.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts.
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/unix_bpf.c')
| -rw-r--r-- | net/unix/unix_bpf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/unix/unix_bpf.c b/net/unix/unix_bpf.c index 2f9d8271c6ec..7ea7c3a0d0d0 100644 --- a/net/unix/unix_bpf.c +++ b/net/unix/unix_bpf.c @@ -159,12 +159,17 @@ int unix_dgram_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool re int unix_stream_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore) { + struct sock *sk_pair; + if (restore) { sk->sk_write_space = psock->saved_write_space; sock_replace_proto(sk, psock->sk_proto); return 0; } + sk_pair = unix_peer(sk); + sock_hold(sk_pair); + psock->sk_pair = sk_pair; unix_stream_bpf_check_needs_rebuild(psock->sk_proto); sock_replace_proto(sk, &unix_stream_bpf_prot); return 0; |
