summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-03 00:25:13 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 15:27:08 -0700
commitc63661848581a9842dfc72d9a400285dd284fc47 (patch)
tree83c8372a5289e14237eea64207886508866ee1a4 /include
parenta09785a2414afb261d9f719d544742af4300df22 (diff)
downloadop-kernel-dev-c63661848581a9842dfc72d9a400285dd284fc47.zip
op-kernel-dev-c63661848581a9842dfc72d9a400285dd284fc47.tar.gz
[PATCH] lockdep: annotate bh_lock_sock()
Teach special (recursive) locking code to the lock validator. Has no effect on non-lockdep kernels. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 83805fe..0969fb6 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -751,6 +751,9 @@ extern void FASTCALL(release_sock(struct sock *sk));
/* BH context may only use the following locking interface. */
#define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock))
+#define bh_lock_sock_nested(__sk) \
+ spin_lock_nested(&((__sk)->sk_lock.slock), \
+ SINGLE_DEPTH_NESTING)
#define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock))
extern struct sock *sk_alloc(int family,
OpenPOWER on IntegriCloud