You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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
...
This commit is contained in:
@@ -271,10 +271,24 @@ static void addrconf_mod_dad_timer(struct inet6_ifaddr *ifp,
|
||||
|
||||
static int snmp6_alloc_dev(struct inet6_dev *idev)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (snmp_mib_init((void __percpu **)idev->stats.ipv6,
|
||||
sizeof(struct ipstats_mib),
|
||||
__alignof__(struct ipstats_mib)) < 0)
|
||||
goto err_ip;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
struct ipstats_mib *addrconf_stats;
|
||||
addrconf_stats = per_cpu_ptr(idev->stats.ipv6[0], i);
|
||||
u64_stats_init(&addrconf_stats->syncp);
|
||||
#if SNMP_ARRAY_SZ == 2
|
||||
addrconf_stats = per_cpu_ptr(idev->stats.ipv6[1], i);
|
||||
u64_stats_init(&addrconf_stats->syncp);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
idev->stats.icmpv6dev = kzalloc(sizeof(struct icmpv6_mib_device),
|
||||
GFP_KERNEL);
|
||||
if (!idev->stats.icmpv6dev)
|
||||
|
||||
@@ -714,6 +714,8 @@ static void ipv6_packet_cleanup(void)
|
||||
|
||||
static int __net_init ipv6_init_mibs(struct net *net)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (snmp_mib_init((void __percpu **)net->mib.udp_stats_in6,
|
||||
sizeof(struct udp_mib),
|
||||
__alignof__(struct udp_mib)) < 0)
|
||||
@@ -726,6 +728,18 @@ static int __net_init ipv6_init_mibs(struct net *net)
|
||||
sizeof(struct ipstats_mib),
|
||||
__alignof__(struct ipstats_mib)) < 0)
|
||||
goto err_ip_mib;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
struct ipstats_mib *af_inet6_stats;
|
||||
af_inet6_stats = per_cpu_ptr(net->mib.ipv6_statistics[0], i);
|
||||
u64_stats_init(&af_inet6_stats->syncp);
|
||||
#if SNMP_ARRAY_SZ == 2
|
||||
af_inet6_stats = per_cpu_ptr(net->mib.ipv6_statistics[1], i);
|
||||
u64_stats_init(&af_inet6_stats->syncp);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if (snmp_mib_init((void __percpu **)net->mib.icmpv6_statistics,
|
||||
sizeof(struct icmpv6_mib),
|
||||
__alignof__(struct icmpv6_mib)) < 0)
|
||||
|
||||
@@ -1252,6 +1252,7 @@ static void ip6gre_tunnel_setup(struct net_device *dev)
|
||||
static int ip6gre_tunnel_init(struct net_device *dev)
|
||||
{
|
||||
struct ip6_tnl *tunnel;
|
||||
int i;
|
||||
|
||||
tunnel = netdev_priv(dev);
|
||||
|
||||
@@ -1269,6 +1270,13 @@ static int ip6gre_tunnel_init(struct net_device *dev)
|
||||
if (!dev->tstats)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
struct pcpu_tstats *ip6gre_tunnel_stats;
|
||||
ip6gre_tunnel_stats = per_cpu_ptr(dev->tstats, i);
|
||||
u64_stats_init(&ip6gre_tunnel_stats->syncp);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1449,6 +1457,7 @@ static void ip6gre_netlink_parms(struct nlattr *data[],
|
||||
static int ip6gre_tap_init(struct net_device *dev)
|
||||
{
|
||||
struct ip6_tnl *tunnel;
|
||||
int i;
|
||||
|
||||
tunnel = netdev_priv(dev);
|
||||
|
||||
@@ -1462,6 +1471,12 @@ static int ip6gre_tap_init(struct net_device *dev)
|
||||
if (!dev->tstats)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
struct pcpu_tstats *ip6gre_tap_stats;
|
||||
ip6gre_tap_stats = per_cpu_ptr(dev->tstats, i);
|
||||
u64_stats_init(&ip6gre_tap_stats->syncp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -910,7 +910,7 @@ static int ip6_dst_lookup_tail(struct sock *sk,
|
||||
|
||||
out_err_release:
|
||||
if (err == -ENETUNREACH)
|
||||
IP6_INC_STATS_BH(net, NULL, IPSTATS_MIB_OUTNOROUTES);
|
||||
IP6_INC_STATS(net, NULL, IPSTATS_MIB_OUTNOROUTES);
|
||||
dst_release(*dst);
|
||||
*dst = NULL;
|
||||
return err;
|
||||
|
||||
@@ -1494,12 +1494,19 @@ static inline int
|
||||
ip6_tnl_dev_init_gen(struct net_device *dev)
|
||||
{
|
||||
struct ip6_tnl *t = netdev_priv(dev);
|
||||
int i;
|
||||
|
||||
t->dev = dev;
|
||||
t->net = dev_net(dev);
|
||||
dev->tstats = alloc_percpu(struct pcpu_tstats);
|
||||
if (!dev->tstats)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
struct pcpu_tstats *ip6_tnl_stats;
|
||||
ip6_tnl_stats = per_cpu_ptr(dev->tstats, i);
|
||||
u64_stats_init(&ip6_tnl_stats->syncp);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1320,6 +1320,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
|
||||
static int ipip6_tunnel_init(struct net_device *dev)
|
||||
{
|
||||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||
int i;
|
||||
|
||||
tunnel->dev = dev;
|
||||
tunnel->net = dev_net(dev);
|
||||
@@ -1332,6 +1333,12 @@ static int ipip6_tunnel_init(struct net_device *dev)
|
||||
if (!dev->tstats)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
struct pcpu_tstats *ipip6_tunnel_stats;
|
||||
ipip6_tunnel_stats = per_cpu_ptr(dev->tstats, i);
|
||||
u64_stats_init(&ipip6_tunnel_stats->syncp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1341,6 +1348,7 @@ static int __net_init ipip6_fb_tunnel_init(struct net_device *dev)
|
||||
struct iphdr *iph = &tunnel->parms.iph;
|
||||
struct net *net = dev_net(dev);
|
||||
struct sit_net *sitn = net_generic(net, sit_net_id);
|
||||
int i;
|
||||
|
||||
tunnel->dev = dev;
|
||||
tunnel->net = dev_net(dev);
|
||||
@@ -1354,6 +1362,13 @@ static int __net_init ipip6_fb_tunnel_init(struct net_device *dev)
|
||||
dev->tstats = alloc_percpu(struct pcpu_tstats);
|
||||
if (!dev->tstats)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
struct pcpu_tstats *ipip6_fb_stats;
|
||||
ipip6_fb_stats = per_cpu_ptr(dev->tstats, i);
|
||||
u64_stats_init(&ipip6_fb_stats->syncp);
|
||||
}
|
||||
|
||||
dev_hold(dev);
|
||||
rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user