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.h | |
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/protocol.h')
-rw-r--r-- | net/mptcp/protocol.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 1cc7948a1826..73a923d02aad 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -288,6 +288,11 @@ struct mptcp_sock { #define mptcp_for_each_subflow(__msk, __subflow) \ list_for_each_entry(__subflow, &((__msk)->conn_list), node) +static inline void msk_owned_by_me(const struct mptcp_sock *msk) +{ + sock_owned_by_me((const struct sock *)msk); +} + static inline struct mptcp_sock *mptcp_sk(const struct sock *sk) { return (struct mptcp_sock *)sk; |