diff options
| author | Greg Kroah-Hartman <[email protected]> | 2023-12-04 06:42:16 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-12-04 06:42:16 +0000 |
| commit | 4906f39a1343713a4fb3fe78aecd12eba5257dc0 (patch) | |
| tree | 2487e32b1e02681683a842f26bbc05e9d1aba308 /net/unix/unix_bpf.c | |
| parent | devcoredump: Send uevent once devcd is ready (diff) | |
| parent | Linux 6.7-rc4 (diff) | |
| download | kernel-4906f39a1343713a4fb3fe78aecd12eba5257dc0.tar.gz kernel-4906f39a1343713a4fb3fe78aecd12eba5257dc0.zip | |
Merge 6.7-rc4 into char-misc-linus
We need 6.7-rc4 in here as we need to revert one of the debugfs changes
that came in that release through the wireless tree.
Signed-off-by: Greg Kroah-Hartman <[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; |
