Message ID | 20241118182718.3011097-12-matttbe@kernel.org (mailing list archive) |
---|---|
State | Mainlined, archived |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | mptcp: fix recent failed backports | expand |
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c index e268f61d8eb0..8faf776cb977 100644 --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -324,14 +324,17 @@ int mptcp_nl_cmd_remove(struct sk_buff *skb, struct genl_info *info) lock_sock(sk); + spin_lock_bh(&msk->pm.lock); match = mptcp_userspace_pm_lookup_addr_by_id(msk, id_val); if (!match) { GENL_SET_ERR_MSG(info, "address with specified id not found"); + spin_unlock_bh(&msk->pm.lock); release_sock(sk); goto remove_err; } list_move(&match->list, &free_list); + spin_unlock_bh(&msk->pm.lock); mptcp_pm_remove_addrs(msk, &free_list);