diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 02:30:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 02:30:30 -0500 |
commit | 5e30025a319910695f5010dc0fb53a23299da14d (patch) | |
tree | 4292bcf78de221c7de1774ccf5ad0ac5a9315c26 /net/ipv6/af_inet6.c | |
parent | 7971e23a66c94f1b9bd2d64a3e86dfbfa8c60121 (diff) | |
parent | 90d3839b90fe379557dae4a44735a6af78f42885 (diff) |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core locking changes from Ingo Molnar:
"The biggest changes:
- add lockdep support for seqcount/seqlocks structures, this
unearthed both bugs and required extra annotation.
- move the various kernel locking primitives to the new
kernel/locking/ directory"
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
block: Use u64_stats_init() to initialize seqcounts
locking/lockdep: Mark __lockdep_count_forward_deps() as static
lockdep/proc: Fix lock-time avg computation
locking/doc: Update references to kernel/mutex.c
ipv6: Fix possible ipv6 seqlock deadlock
cpuset: Fix potential deadlock w/ set_mems_allowed
seqcount: Add lockdep functionality to seqcount/seqlock structures
net: Explicitly initialize u64_stats_sync structures for lockdep
locking: Move the percpu-rwsem code to kernel/locking/
locking: Move the lglocks code to kernel/locking/
locking: Move the rwsem code to kernel/locking/
locking: Move the rtmutex code to kernel/locking/
locking: Move the semaphore core to kernel/locking/
locking: Move the spinlock code to kernel/locking/
locking: Move the lockdep code to kernel/locking/
locking: Move the mutex code to kernel/locking/
hung_task debugging: Add tracepoint to report the hang
x86/locking/kconfig: Update paravirt spinlock Kconfig description
lockstat: Report avg wait and hold times
lockdep, x86/alternatives: Drop ancient lockdep fixup message
...
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 6468bda1f2b9..ff75313f27a8 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -714,6 +714,8 @@ static void ipv6_packet_cleanup(void) | |||
714 | 714 | ||
715 | static int __net_init ipv6_init_mibs(struct net *net) | 715 | static int __net_init ipv6_init_mibs(struct net *net) |
716 | { | 716 | { |
717 | int i; | ||
718 | |||
717 | if (snmp_mib_init((void __percpu **)net->mib.udp_stats_in6, | 719 | if (snmp_mib_init((void __percpu **)net->mib.udp_stats_in6, |
718 | sizeof(struct udp_mib), | 720 | sizeof(struct udp_mib), |
719 | __alignof__(struct udp_mib)) < 0) | 721 | __alignof__(struct udp_mib)) < 0) |
@@ -726,6 +728,18 @@ static int __net_init ipv6_init_mibs(struct net *net) | |||
726 | sizeof(struct ipstats_mib), | 728 | sizeof(struct ipstats_mib), |
727 | __alignof__(struct ipstats_mib)) < 0) | 729 | __alignof__(struct ipstats_mib)) < 0) |
728 | goto err_ip_mib; | 730 | goto err_ip_mib; |
731 | |||
732 | for_each_possible_cpu(i) { | ||
733 | struct ipstats_mib *af_inet6_stats; | ||
734 | af_inet6_stats = per_cpu_ptr(net->mib.ipv6_statistics[0], i); | ||
735 | u64_stats_init(&af_inet6_stats->syncp); | ||
736 | #if SNMP_ARRAY_SZ == 2 | ||
737 | af_inet6_stats = per_cpu_ptr(net->mib.ipv6_statistics[1], i); | ||
738 | u64_stats_init(&af_inet6_stats->syncp); | ||
739 | #endif | ||
740 | } | ||
741 | |||
742 | |||
729 | if (snmp_mib_init((void __percpu **)net->mib.icmpv6_statistics, | 743 | if (snmp_mib_init((void __percpu **)net->mib.icmpv6_statistics, |
730 | sizeof(struct icmpv6_mib), | 744 | sizeof(struct icmpv6_mib), |
731 | __alignof__(struct icmpv6_mib)) < 0) | 745 | __alignof__(struct icmpv6_mib)) < 0) |