diff options
author | Inki Dae <inki.dae@samsung.com> | 2023-12-12 07:06:29 +0300 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2023-12-12 07:06:29 +0300 |
commit | a2f8994c1001cfa48483a3afa3550016a3ab0a3e (patch) | |
tree | cee477354e8ce7feea9c00e1f354808972939e2c /net/unix/unix_bpf.c | |
parent | a60501d7c2d3e70b3545b9b96576628e369d8e85 (diff) | |
parent | 8d1b7809684c688005706125b804e1f9792d2b1b (diff) | |
download | linux-a2f8994c1001cfa48483a3afa3550016a3ab0a3e.tar.xz |
Merge tag 'exynos-drm-next-for-v6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into exynos-drm-next
Two fixups
- Fix a potential error pointer dereference by checking the return value
of exynos_drm_crtc_get_by_type() function before accessing to crtc
object.
- Fix a wrong error checking in exynos_drm_dma.c modules, which was reported
by Dan[1]
[1] https://lore.kernel.org/all/33e52277-1349-472b-a55b-ab5c3462bfcf@moroto.mountain/
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; |