diff options
| author | Cong Wang <[email protected]> | 2021-04-07 03:21:11 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2021-04-12 15:34:27 +0000 |
| commit | 51e0158a54321a48d260e95998393934bb0de52c (patch) | |
| tree | 886e66f533cd8a55c78f23013ecf3325dafc9519 /net/core/sock_map.c | |
| parent | bpf: Sync bpf headers in tooling infrastucture (diff) | |
| download | kernel-51e0158a54321a48d260e95998393934bb0de52c.tar.gz kernel-51e0158a54321a48d260e95998393934bb0de52c.zip | |
skmsg: Pass psock pointer to ->psock_update_sk_prot()
Using sk_psock() to retrieve psock pointer from sock requires
RCU read lock, but we already get psock pointer before calling
->psock_update_sk_prot() in both cases, so we can just pass it
without bothering sk_psock().
Fixes: 8a59f9d1e3d4 ("sock: Introduce sk->sk_prot->psock_update_sk_prot()")
Reported-by: [email protected]
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Tested-by: [email protected]
Reviewed-by: Jakub Sitnicki <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/core/sock_map.c')
| -rw-r--r-- | net/core/sock_map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock_map.c b/net/core/sock_map.c index 3d190d22b0d8..f473c51cbc4b 100644 --- a/net/core/sock_map.c +++ b/net/core/sock_map.c @@ -188,7 +188,7 @@ static int sock_map_init_proto(struct sock *sk, struct sk_psock *psock) if (!sk->sk_prot->psock_update_sk_prot) return -EINVAL; psock->psock_update_sk_prot = sk->sk_prot->psock_update_sk_prot; - return sk->sk_prot->psock_update_sk_prot(sk, false); + return sk->sk_prot->psock_update_sk_prot(sk, psock, false); } static struct sk_psock *sock_map_psock_get_checked(struct sock *sk) |
