summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Herbert <tom@quantonium.net>2017-12-28 11:00:43 -0800
committerDavid S. Miller <davem@davemloft.net>2017-12-28 14:28:22 -0500
commit602f7a2714a3b3aa4bec82ab0a86a9f5a2c4aa61 (patch)
tree6b21c6d597871fcf6a46e57dde87f85a4f9f8ad6 /include
parentf72c4ac695573699dde5b71da1c3b9ef80440616 (diff)
sock: Add sock_owned_by_user_nocheck
This allows checking socket lock ownership with producing lockdep warnings. Signed-off-by: Tom Herbert <tom@quantonium.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 9155da422692..7a7b14e9628a 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1514,6 +1514,11 @@ static inline bool sock_owned_by_user(const struct sock *sk)
return sk->sk_lock.owned;
}
+static inline bool sock_owned_by_user_nocheck(const struct sock *sk)
+{
+ return sk->sk_lock.owned;
+}
+
/* no reclassification while locks are held */
static inline bool sock_allow_reclassification(const struct sock *csk)
{