From e5e4452190fd42838db4b11912bd8cd03fa61e08 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 16 Apr 2024 05:22:58 +0200 Subject: Merging upstream version 6.1.85. Signed-off-by: Daniel Baumann --- include/net/sock.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/net/sock.h') diff --git a/include/net/sock.h b/include/net/sock.h index 579732d47..60577751e 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1833,6 +1833,13 @@ static inline void sock_owned_by_me(const struct sock *sk) #endif } +static inline void sock_not_owned_by_me(const struct sock *sk) +{ +#ifdef CONFIG_LOCKDEP + WARN_ON_ONCE(lockdep_sock_is_held(sk) && debug_locks); +#endif +} + static inline bool sock_owned_by_user(const struct sock *sk) { sock_owned_by_me(sk); -- cgit v1.2.3