summaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-08-18 11:02:52 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-08-18 11:02:52 -0700
commitef7d1b244fa6c94fb76d5f787b8629df64ea4046 (patch)
treeeb6b35bb250f46d75853764bd9309c75e4f03c72 /net/ipv6/icmp.c
parented0da6fc9d3096f54c4a76737eeae57ac81418cf (diff)
parent78eb887733ec8ff5d6e6c69e3c32a187a9303622 (diff)
downloadop-kernel-dev-ef7d1b244fa6c94fb76d5f787b8629df64ea4046.zip
op-kernel-dev-ef7d1b244fa6c94fb76d5f787b8629df64ea4046.tar.gz
Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 1044b6f..3d6e9a3 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -712,6 +712,11 @@ discard_it:
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.
OpenPOWER on IntegriCloud