Message ID | 20220902002809.2888981-1-kafai@fb.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2c5b6bf5cda048af896bb0e12a956783f7d6c835 |
Delegated to: | BPF |
Headers | show |
Series | bpf: net: Remove duplicated code from bpf_getsockopt() | expand |
diff --git a/net/core/filter.c b/net/core/filter.c index 0f6f86b9e487..8e7fc71160cd 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -10718,7 +10718,7 @@ int sk_get_filter(struct sock *sk, sockptr_t optval, unsigned int len) struct sk_filter *filter; int ret = 0; - lock_sock(sk); + sockopt_lock_sock(sk); filter = rcu_dereference_protected(sk->sk_filter, lockdep_sock_is_held(sk)); if (!filter) @@ -10751,7 +10751,7 @@ int sk_get_filter(struct sock *sk, sockptr_t optval, unsigned int len) */ ret = fprog->len; out: - release_sock(sk); + sockopt_release_sock(sk); return ret; }