Skip to content

Commit

Permalink
Squash to "bpf: Add mptcp_subflow bpf_iter"
Browse files Browse the repository at this point in the history
Address Martin's comments in v1:

- bpf_iter_mptcp_subflow_new returns -EINVAL when msk socket lock isn't
  held.

Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang authored and intel-lab-lkp committed Nov 21, 2024
1 parent 081af0b commit 1faebcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mptcp/bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1faebcc

Please sign in to comment.