lockdep: annotate __icmpv6_socket
Subsystems (3)
PATCH 2/13 lockdep: annotate __icmpv6_socket
From: Ingo Molnar <[email protected]>
Split off __icmpv6_socket's sk->sk_dst_lock class, because it gets used from softirqs, which is safe for __icmpv6_sockets (because they never get directly used via userspace syscalls), but unsafe for normal sockets.
Has no effect on non-lockdep kernels.
Signed-off-by Ingo Molnar <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc Arjan van de Ven <[email protected]>
Acked-by Herbert Xu <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
net/ipv6/icmp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
net/ipv6/icmp.c renamed from net/ipv6/icmp.c~lockdep-fix-sk_dst_check-deadlock +13 -0
@@ -714,6 +714,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;
@@ -732,6 +737,14 @@ int __init icmpv6_init(struct net_proto_ 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.
_
From: [email protected]
Date: Mon, 14 Aug 2006 23:03:37 -0700
Quoted 6 lines
From: Ingo Molnar <[email protected]>
Split off __icmpv6_socket's
sk->sk_dst_lockclass, because it gets used from softirqs, which is safe for__icmpv6_sockets(because they never get directly used via userspace syscalls), but unsafe for normal sockets.
Quoted 8 lines
Has no effect on non-lockdep kernels.
Signed-off-by Ingo Molnar <[email protected]>Cc "David S. Miller" <[email protected]>Cc Jeff Garzik <[email protected]>Cc Arjan van de Ven <[email protected]>Acked-by Herbert Xu <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Applied, I'll push this into 2.6.18