diff options
author | Florian Westphal <fw@strlen.de> | 2021-02-04 15:23:30 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-06 14:35:47 -0800 |
commit | 3abc05d9ef6fe989706b679e1e6371d6360d3db4 (patch) | |
tree | 5672614138e7851ae7d4a191bfd784085d16588c /net/mptcp/pm.c | |
parent | 1002b89f23eaa6d48ca1d2f362e894086bd063f1 (diff) |
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 <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/pm.c')
-rw-r--r-- | net/mptcp/pm.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |