aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h4
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 {
80 wait_queue_head_t wq; 80 wait_queue_head_t wq;
81} socket_lock_t; 81} socket_lock_t;
82 82
83extern struct lock_class_key af_family_keys[AF_MAX];
84
83#define sock_lock_init(__sk) \ 85#define sock_lock_init(__sk) \
84do { spin_lock_init(&((__sk)->sk_lock.slock)); \ 86do { spin_lock_init(&((__sk)->sk_lock.slock)); \
87 lockdep_set_class(&(__sk)->sk_lock.slock, \
88 af_family_keys + (__sk)->sk_family); \
85 (__sk)->sk_lock.owner = NULL; \ 89 (__sk)->sk_lock.owner = NULL; \
86 init_waitqueue_head(&((__sk)->sk_lock.wq)); \ 90 init_waitqueue_head(&((__sk)->sk_lock.wq)); \
87} while(0) 91} while(0)