diff options
author | Tom Herbert <tom@quantonium.net> | 2017-12-28 20:00:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-28 20:28:22 +0100 |
commit | 602f7a2714a3b3aa4bec82ab0a86a9f5a2c4aa61 (patch) | |
tree | 6b21c6d597871fcf6a46e57dde87f85a4f9f8ad6 /include/net/sock.h | |
parent | skbuff: in skb_copy_ubufs unclone before releasing zerocopy (diff) | |
download | linux-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.h | 5 |
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) { |