summaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorTom Herbert <tom@quantonium.net>2017-12-28 20:00:43 +0100
committerDavid S. Miller <davem@davemloft.net>2017-12-28 20:28:22 +0100
commit602f7a2714a3b3aa4bec82ab0a86a9f5a2c4aa61 (patch)
tree6b21c6d597871fcf6a46e57dde87f85a4f9f8ad6 /include/net/sock.h
parentskbuff: in skb_copy_ubufs unclone before releasing zerocopy (diff)
downloadlinux-602f7a2714a3b3aa4bec82ab0a86a9f5a2c4aa61.tar.xz
linux-602f7a2714a3b3aa4bec82ab0a86a9f5a2c4aa61.zip
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 '')
-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)
{