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/protocol.c | |
parent | 1002b89f23eaa6d48ca1d2f362e894086bd063f1 (diff) | |
download | linux-3abc05d9ef6fe989706b679e1e6371d6360d3db4.tar.gz linux-3abc05d9ef6fe989706b679e1e6371d6360d3db4.tar.bz2 linux-3abc05d9ef6fe989706b679e1e6371d6360d3db4.zip |
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/protocol.c')
-rw-r--r-- | net/mptcp/protocol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 1405e146dd7c..b9f16a1535d2 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2187,6 +2187,8 @@ static void __mptcp_close_subflow(struct mptcp_sock *msk) { struct mptcp_subflow_context *subflow, *tmp; + might_sleep(); + list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) { struct sock *ssk = mptcp_subflow_tcp_sock(subflow); @@ -2529,6 +2531,8 @@ static void __mptcp_destroy_sock(struct sock *sk) pr_debug("msk=%p", msk); + might_sleep(); + /* dispose the ancillatory tcp socket, if any */ if (msk->subflow) { iput(SOCK_INODE(msk->subflow)); |