Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: Acquire and release mptcp socket
The KF_TRUSTED_ARGS flag is used for bpf_iter_mptcp_subflow_new, it indicates that the all pointer arguments are valid. It's necessary to add a KF_ACQUIRE helper to get valid "msk". This patch adds bpf_mptcp_sock_acquire() and bpf_mptcp_sock_release() helpers for this. Increase sk->sk_refcnt in _acquire() and decrease it in _release(). Register them with KF_ACQUIRE flag and KF_RELEASE flag. Signed-off-by: Geliang Tang <[email protected]> Reviewed-by: Mat Martineau <[email protected]>
- Loading branch information