aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/sock.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 091032a250c7..25d2557211c1 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -171,6 +171,19 @@ static const char *af_family_slock_key_strings[AF_MAX+1] = {
171 "slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" , 171 "slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" ,
172 "slock-AF_RXRPC" , "slock-AF_MAX" 172 "slock-AF_RXRPC" , "slock-AF_MAX"
173}; 173};
174static const char *af_family_clock_key_strings[AF_MAX+1] = {
175 "clock-AF_UNSPEC", "clock-AF_UNIX" , "clock-AF_INET" ,
176 "clock-AF_AX25" , "clock-AF_IPX" , "clock-AF_APPLETALK",
177 "clock-AF_NETROM", "clock-AF_BRIDGE" , "clock-AF_ATMPVC" ,
178 "clock-AF_X25" , "clock-AF_INET6" , "clock-AF_ROSE" ,
179 "clock-AF_DECnet", "clock-AF_NETBEUI" , "clock-AF_SECURITY" ,
180 "clock-AF_KEY" , "clock-AF_NETLINK" , "clock-AF_PACKET" ,
181 "clock-AF_ASH" , "clock-AF_ECONET" , "clock-AF_ATMSVC" ,
182 "clock-21" , "clock-AF_SNA" , "clock-AF_IRDA" ,
183 "clock-AF_PPPOX" , "clock-AF_WANPIPE" , "clock-AF_LLC" ,
184 "clock-27" , "clock-28" , "clock-29" ,
185 "clock-AF_TIPC" , "clock-AF_BLUETOOTH", "clock-AF_MAX"
186};
174#endif 187#endif
175 188
176/* 189/*
@@ -941,8 +954,9 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
941 954
942 rwlock_init(&newsk->sk_dst_lock); 955 rwlock_init(&newsk->sk_dst_lock);
943 rwlock_init(&newsk->sk_callback_lock); 956 rwlock_init(&newsk->sk_callback_lock);
944 lockdep_set_class(&newsk->sk_callback_lock, 957 lockdep_set_class_and_name(&newsk->sk_callback_lock,
945 af_callback_keys + newsk->sk_family); 958 af_callback_keys + newsk->sk_family,
959 af_family_clock_key_strings[newsk->sk_family]);
946 960
947 newsk->sk_dst_cache = NULL; 961 newsk->sk_dst_cache = NULL;
948 newsk->sk_wmem_queued = 0; 962 newsk->sk_wmem_queued = 0;
@@ -1530,8 +1544,9 @@ void sock_init_data(struct socket *sock, struct sock *sk)
1530 1544
1531 rwlock_init(&sk->sk_dst_lock); 1545 rwlock_init(&sk->sk_dst_lock);
1532 rwlock_init(&sk->sk_callback_lock); 1546 rwlock_init(&sk->sk_callback_lock);
1533 lockdep_set_class(&sk->sk_callback_lock, 1547 lockdep_set_class_and_name(&sk->sk_callback_lock,
1534 af_callback_keys + sk->sk_family); 1548 af_callback_keys + sk->sk_family,
1549 af_family_clock_key_strings[sk->sk_family]);
1535 1550
1536 sk->sk_state_change = sock_def_wakeup; 1551 sk->sk_state_change = sock_def_wakeup;
1537 sk->sk_data_ready = sock_def_readable; 1552 sk->sk_data_ready = sock_def_readable;