diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c index 02038db59956c8..5aaeaf641f7fde 100644 --- a/net/mptcp/bpf.c +++ b/net/mptcp/bpf.c @@ -252,7 +252,8 @@ bpf_iter_mptcp_subflow_new(struct bpf_iter_mptcp_subflow *it, if (!msk) return -EINVAL; - msk_owned_by_me(msk); + if (!lockdep_sock_is_held((const struct sock *)msk)) + return -EINVAL; kit->pos = &msk->conn_list; return 0;