diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-03 00:25:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-03 15:27:07 -0700 |
commit | da21f24dd73954c2ed0cd39a698e2c9916c05d71 (patch) | |
tree | 22829e3791f0602d284b8f5398526b228faa9501 /include/net | |
parent | 543655244866b8ec648fea1eb9c32a35ffba5721 (diff) | |
download | blackbird-op-linux-da21f24dd73954c2ed0cd39a698e2c9916c05d71.tar.gz blackbird-op-linux-da21f24dd73954c2ed0cd39a698e2c9916c05d71.zip |
[PATCH] lockdep: annotate sock_lock_init()
Teach special (multi-initialized, per-address-family) 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/net')
-rw-r--r-- | include/net/sock.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 7b3d6b856946..83805feea880 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -80,8 +80,12 @@ typedef struct { wait_queue_head_t wq; } socket_lock_t; +extern struct lock_class_key af_family_keys[AF_MAX]; + #define sock_lock_init(__sk) \ do { spin_lock_init(&((__sk)->sk_lock.slock)); \ + lockdep_set_class(&(__sk)->sk_lock.slock, \ + af_family_keys + (__sk)->sk_family); \ (__sk)->sk_lock.owner = NULL; \ init_waitqueue_head(&((__sk)->sk_lock.wq)); \ } while(0) |