From 3abc05d9ef6fe989706b679e1e6371d6360d3db4 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 4 Feb 2021 15:23:30 -0800 Subject: mptcp: pm: add lockdep assertions Add a few assertions to make sure functions are called with the needed locks held. Two functions gain might_sleep annotations because they contain conditional calls to functions that sleep. Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski --- net/mptcp/pm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net/mptcp/pm.c') diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c index 3a22e73220b9..1a25003fd8e3 100644 --- a/net/mptcp/pm.c +++ b/net/mptcp/pm.c @@ -20,6 +20,8 @@ int mptcp_pm_announce_addr(struct mptcp_sock *msk, pr_debug("msk=%p, local_id=%d", msk, addr->id); + lockdep_assert_held(&msk->pm.lock); + if (add_addr) { pr_warn("addr_signal error, add_addr=%d", add_addr); return -EINVAL; -- cgit v1.2.3