From 2ef3219e49701c273d16d55bf8fcbd3c6f422ae0 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 15 Aug 2006 00:06:56 -0700 Subject: [PATCH] --- yaml --- r: 33397 b: refs/heads/master c: 640c41c77a96dbbfb74d40ae86ab75b759afb911 h: refs/heads/master i: 33395: 935e36f461fe1b7851cf56b21b1c4339d276c2de v: v3 --- [refs] | 2 +- trunk/net/ipv6/icmp.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index efdbe1acd680..b7534dc57ca2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: deb47c66e12a645f7eec9b1c153c05ed47989439 +refs/heads/master: 640c41c77a96dbbfb74d40ae86ab75b759afb911 diff --git a/trunk/net/ipv6/icmp.c b/trunk/net/ipv6/icmp.c index 1044b6fce0d5..3d6e9a351150 100644 --- a/trunk/net/ipv6/icmp.c +++ b/trunk/net/ipv6/icmp.c @@ -712,6 +712,11 @@ static int icmpv6_rcv(struct sk_buff **pskb) return 0; } +/* + * Special lock-class for __icmpv6_socket: + */ +static struct lock_class_key icmpv6_socket_sk_dst_lock_key; + int __init icmpv6_init(struct net_proto_family *ops) { struct sock *sk; @@ -730,6 +735,14 @@ int __init icmpv6_init(struct net_proto_family *ops) sk = per_cpu(__icmpv6_socket, i)->sk; sk->sk_allocation = GFP_ATOMIC; + /* + * Split off their lock-class, because sk->sk_dst_lock + * gets used from softirqs, which is safe for + * __icmpv6_socket (because those never get directly used + * via userspace syscalls), but unsafe for normal sockets. + */ + lockdep_set_class(&sk->sk_dst_lock, + &icmpv6_socket_sk_dst_lock_key); /* Enough space for 2 64K ICMP packets, including * sk_buff struct overhead.