diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-08-31 01:45:48 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-08-31 01:45:48 -0400 |
| commit | aa43f77939c97bf9d3580c6a5e71a5a40290e451 (patch) | |
| tree | 095c0b8b3da4b6554a3f8ef4b39240a5d9216d4d /net/ipv6/icmp.c | |
| parent | 2818c5dec5e28d65d52afbb7695bbbafe6377ee5 (diff) | |
| parent | 4c15343167b5febe7bb0ba96aad5bef42ae94d3b (diff) | |
Merge branch 'merge'
Diffstat (limited to 'net/ipv6/icmp.c')
| -rw-r--r-- | net/ipv6/icmp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 1044b6fce0d5..3d6e9a351150 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
| @@ -712,6 +712,11 @@ discard_it: | |||
| 712 | return 0; | 712 | return 0; |
| 713 | } | 713 | } |
| 714 | 714 | ||
| 715 | /* | ||
| 716 | * Special lock-class for __icmpv6_socket: | ||
| 717 | */ | ||
| 718 | static struct lock_class_key icmpv6_socket_sk_dst_lock_key; | ||
| 719 | |||
| 715 | int __init icmpv6_init(struct net_proto_family *ops) | 720 | int __init icmpv6_init(struct net_proto_family *ops) |
| 716 | { | 721 | { |
| 717 | struct sock *sk; | 722 | struct sock *sk; |
| @@ -730,6 +735,14 @@ int __init icmpv6_init(struct net_proto_family *ops) | |||
| 730 | 735 | ||
| 731 | sk = per_cpu(__icmpv6_socket, i)->sk; | 736 | sk = per_cpu(__icmpv6_socket, i)->sk; |
| 732 | sk->sk_allocation = GFP_ATOMIC; | 737 | sk->sk_allocation = GFP_ATOMIC; |
| 738 | /* | ||
| 739 | * Split off their lock-class, because sk->sk_dst_lock | ||
| 740 | * gets used from softirqs, which is safe for | ||
| 741 | * __icmpv6_socket (because those never get directly used | ||
| 742 | * via userspace syscalls), but unsafe for normal sockets. | ||
| 743 | */ | ||
| 744 | lockdep_set_class(&sk->sk_dst_lock, | ||
| 745 | &icmpv6_socket_sk_dst_lock_key); | ||
| 733 | 746 | ||
| 734 | /* Enough space for 2 64K ICMP packets, including | 747 | /* Enough space for 2 64K ICMP packets, including |
| 735 | * sk_buff struct overhead. | 748 | * sk_buff struct overhead. |
