aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/rfcomm/tty.c1
-rw-r--r--net/core/dev.c24
-rw-r--r--net/core/net-sysfs.c4
-rw-r--r--net/core/netprio_cgroup.c10
-rw-r--r--net/core/sock.c10
-rw-r--r--net/core/sysctl_net_core.c4
-rw-r--r--net/ipv4/cipso_ipv4.c11
-rw-r--r--net/ipv4/ip_sockglue.c7
-rw-r--r--net/ipv4/tcp_memcontrol.c8
-rw-r--r--net/irda/ircomm/ircomm_tty.c7
-rw-r--r--net/mac80211/mesh_pathtbl.c8
-rw-r--r--net/netfilter/core.c6
-rw-r--r--net/sched/cls_cgroup.c10
13 files changed, 42 insertions, 68 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index c179734f143f..4bf54b377255 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -1157,7 +1157,6 @@ int __init rfcomm_init_ttys(void)
1157 if (!rfcomm_tty_driver) 1157 if (!rfcomm_tty_driver)
1158 return -ENOMEM; 1158 return -ENOMEM;
1159 1159
1160 rfcomm_tty_driver->owner = THIS_MODULE;
1161 rfcomm_tty_driver->driver_name = "rfcomm"; 1160 rfcomm_tty_driver->driver_name = "rfcomm";
1162 rfcomm_tty_driver->name = "rfcomm"; 1161 rfcomm_tty_driver->name = "rfcomm";
1163 rfcomm_tty_driver->major = RFCOMM_TTY_MAJOR; 1162 rfcomm_tty_driver->major = RFCOMM_TTY_MAJOR;
diff --git a/net/core/dev.c b/net/core/dev.c
index 0090809af7bd..0f3eb7d79a2d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -134,7 +134,7 @@
134#include <linux/inetdevice.h> 134#include <linux/inetdevice.h>
135#include <linux/cpu_rmap.h> 135#include <linux/cpu_rmap.h>
136#include <linux/net_tstamp.h> 136#include <linux/net_tstamp.h>
137#include <linux/jump_label.h> 137#include <linux/static_key.h>
138#include <net/flow_keys.h> 138#include <net/flow_keys.h>
139 139
140#include "net-sysfs.h" 140#include "net-sysfs.h"
@@ -1439,11 +1439,11 @@ int call_netdevice_notifiers(unsigned long val, struct net_device *dev)
1439} 1439}
1440EXPORT_SYMBOL(call_netdevice_notifiers); 1440EXPORT_SYMBOL(call_netdevice_notifiers);
1441 1441
1442static struct jump_label_key netstamp_needed __read_mostly; 1442static struct static_key netstamp_needed __read_mostly;
1443#ifdef HAVE_JUMP_LABEL 1443#ifdef HAVE_JUMP_LABEL
1444/* We are not allowed to call jump_label_dec() from irq context 1444/* We are not allowed to call static_key_slow_dec() from irq context
1445 * If net_disable_timestamp() is called from irq context, defer the 1445 * If net_disable_timestamp() is called from irq context, defer the
1446 * jump_label_dec() calls. 1446 * static_key_slow_dec() calls.
1447 */ 1447 */
1448static atomic_t netstamp_needed_deferred; 1448static atomic_t netstamp_needed_deferred;
1449#endif 1449#endif
@@ -1455,12 +1455,12 @@ void net_enable_timestamp(void)
1455 1455
1456 if (deferred) { 1456 if (deferred) {
1457 while (--deferred) 1457 while (--deferred)
1458 jump_label_dec(&netstamp_needed); 1458 static_key_slow_dec(&netstamp_needed);
1459 return; 1459 return;
1460 } 1460 }
1461#endif 1461#endif
1462 WARN_ON(in_interrupt()); 1462 WARN_ON(in_interrupt());
1463 jump_label_inc(&netstamp_needed); 1463 static_key_slow_inc(&netstamp_needed);
1464} 1464}
1465EXPORT_SYMBOL(net_enable_timestamp); 1465EXPORT_SYMBOL(net_enable_timestamp);
1466 1466
@@ -1472,19 +1472,19 @@ void net_disable_timestamp(void)
1472 return; 1472 return;
1473 } 1473 }
1474#endif 1474#endif
1475 jump_label_dec(&netstamp_needed); 1475 static_key_slow_dec(&netstamp_needed);
1476} 1476}
1477EXPORT_SYMBOL(net_disable_timestamp); 1477EXPORT_SYMBOL(net_disable_timestamp);
1478 1478
1479static inline void net_timestamp_set(struct sk_buff *skb) 1479static inline void net_timestamp_set(struct sk_buff *skb)
1480{ 1480{
1481 skb->tstamp.tv64 = 0; 1481 skb->tstamp.tv64 = 0;
1482 if (static_branch(&netstamp_needed)) 1482 if (static_key_false(&netstamp_needed))
1483 __net_timestamp(skb); 1483 __net_timestamp(skb);
1484} 1484}
1485 1485
1486#define net_timestamp_check(COND, SKB) \ 1486#define net_timestamp_check(COND, SKB) \
1487 if (static_branch(&netstamp_needed)) { \ 1487 if (static_key_false(&netstamp_needed)) { \
1488 if ((COND) && !(SKB)->tstamp.tv64) \ 1488 if ((COND) && !(SKB)->tstamp.tv64) \
1489 __net_timestamp(SKB); \ 1489 __net_timestamp(SKB); \
1490 } \ 1490 } \
@@ -2651,7 +2651,7 @@ EXPORT_SYMBOL(__skb_get_rxhash);
2651struct rps_sock_flow_table __rcu *rps_sock_flow_table __read_mostly; 2651struct rps_sock_flow_table __rcu *rps_sock_flow_table __read_mostly;
2652EXPORT_SYMBOL(rps_sock_flow_table); 2652EXPORT_SYMBOL(rps_sock_flow_table);
2653 2653
2654struct jump_label_key rps_needed __read_mostly; 2654struct static_key rps_needed __read_mostly;
2655 2655
2656static struct rps_dev_flow * 2656static struct rps_dev_flow *
2657set_rps_cpu(struct net_device *dev, struct sk_buff *skb, 2657set_rps_cpu(struct net_device *dev, struct sk_buff *skb,
@@ -2936,7 +2936,7 @@ int netif_rx(struct sk_buff *skb)
2936 2936
2937 trace_netif_rx(skb); 2937 trace_netif_rx(skb);
2938#ifdef CONFIG_RPS 2938#ifdef CONFIG_RPS
2939 if (static_branch(&rps_needed)) { 2939 if (static_key_false(&rps_needed)) {
2940 struct rps_dev_flow voidflow, *rflow = &voidflow; 2940 struct rps_dev_flow voidflow, *rflow = &voidflow;
2941 int cpu; 2941 int cpu;
2942 2942
@@ -3300,7 +3300,7 @@ int netif_receive_skb(struct sk_buff *skb)
3300 return NET_RX_SUCCESS; 3300 return NET_RX_SUCCESS;
3301 3301
3302#ifdef CONFIG_RPS 3302#ifdef CONFIG_RPS
3303 if (static_branch(&rps_needed)) { 3303 if (static_key_false(&rps_needed)) {
3304 struct rps_dev_flow voidflow, *rflow = &voidflow; 3304 struct rps_dev_flow voidflow, *rflow = &voidflow;
3305 int cpu, ret; 3305 int cpu, ret;
3306 3306
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index a1727cda03d7..495586232aa1 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -608,10 +608,10 @@ static ssize_t store_rps_map(struct netdev_rx_queue *queue,
608 spin_unlock(&rps_map_lock); 608 spin_unlock(&rps_map_lock);
609 609
610 if (map) 610 if (map)
611 jump_label_inc(&rps_needed); 611 static_key_slow_inc(&rps_needed);
612 if (old_map) { 612 if (old_map) {
613 kfree_rcu(old_map, rcu); 613 kfree_rcu(old_map, rcu);
614 jump_label_dec(&rps_needed); 614 static_key_slow_dec(&rps_needed);
615 } 615 }
616 free_cpumask_var(mask); 616 free_cpumask_var(mask);
617 return len; 617 return len;
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
index 4dacc44637ef..ba6900f73900 100644
--- a/net/core/netprio_cgroup.c
+++ b/net/core/netprio_cgroup.c
@@ -23,9 +23,8 @@
23#include <net/sock.h> 23#include <net/sock.h>
24#include <net/netprio_cgroup.h> 24#include <net/netprio_cgroup.h>
25 25
26static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, 26static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp);
27 struct cgroup *cgrp); 27static void cgrp_destroy(struct cgroup *cgrp);
28static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
29static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp); 28static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp);
30 29
31struct cgroup_subsys net_prio_subsys = { 30struct cgroup_subsys net_prio_subsys = {
@@ -121,8 +120,7 @@ static void update_netdev_tables(void)
121 rtnl_unlock(); 120 rtnl_unlock();
122} 121}
123 122
124static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, 123static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp)
125 struct cgroup *cgrp)
126{ 124{
127 struct cgroup_netprio_state *cs; 125 struct cgroup_netprio_state *cs;
128 int ret; 126 int ret;
@@ -146,7 +144,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss,
146 return &cs->css; 144 return &cs->css;
147} 145}
148 146
149static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) 147static void cgrp_destroy(struct cgroup *cgrp)
150{ 148{
151 struct cgroup_netprio_state *cs; 149 struct cgroup_netprio_state *cs;
152 struct net_device *dev; 150 struct net_device *dev;
diff --git a/net/core/sock.c b/net/core/sock.c
index 216719cb5c7f..9be6d0d6c533 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -111,7 +111,7 @@
111#include <linux/init.h> 111#include <linux/init.h>
112#include <linux/highmem.h> 112#include <linux/highmem.h>
113#include <linux/user_namespace.h> 113#include <linux/user_namespace.h>
114#include <linux/jump_label.h> 114#include <linux/static_key.h>
115#include <linux/memcontrol.h> 115#include <linux/memcontrol.h>
116 116
117#include <asm/uaccess.h> 117#include <asm/uaccess.h>
@@ -160,19 +160,19 @@ int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss)
160out: 160out:
161 list_for_each_entry_continue_reverse(proto, &proto_list, node) 161 list_for_each_entry_continue_reverse(proto, &proto_list, node)
162 if (proto->destroy_cgroup) 162 if (proto->destroy_cgroup)
163 proto->destroy_cgroup(cgrp, ss); 163 proto->destroy_cgroup(cgrp);
164 mutex_unlock(&proto_list_mutex); 164 mutex_unlock(&proto_list_mutex);
165 return ret; 165 return ret;
166} 166}
167 167
168void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss) 168void mem_cgroup_sockets_destroy(struct cgroup *cgrp)
169{ 169{
170 struct proto *proto; 170 struct proto *proto;
171 171
172 mutex_lock(&proto_list_mutex); 172 mutex_lock(&proto_list_mutex);
173 list_for_each_entry_reverse(proto, &proto_list, node) 173 list_for_each_entry_reverse(proto, &proto_list, node)
174 if (proto->destroy_cgroup) 174 if (proto->destroy_cgroup)
175 proto->destroy_cgroup(cgrp, ss); 175 proto->destroy_cgroup(cgrp);
176 mutex_unlock(&proto_list_mutex); 176 mutex_unlock(&proto_list_mutex);
177} 177}
178#endif 178#endif
@@ -184,7 +184,7 @@ void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss)
184static struct lock_class_key af_family_keys[AF_MAX]; 184static struct lock_class_key af_family_keys[AF_MAX];
185static struct lock_class_key af_family_slock_keys[AF_MAX]; 185static struct lock_class_key af_family_slock_keys[AF_MAX];
186 186
187struct jump_label_key memcg_socket_limit_enabled; 187struct static_key memcg_socket_limit_enabled;
188EXPORT_SYMBOL(memcg_socket_limit_enabled); 188EXPORT_SYMBOL(memcg_socket_limit_enabled);
189 189
190/* 190/*
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index d05559d4d9cd..0c2850874254 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -69,9 +69,9 @@ static int rps_sock_flow_sysctl(ctl_table *table, int write,
69 if (sock_table != orig_sock_table) { 69 if (sock_table != orig_sock_table) {
70 rcu_assign_pointer(rps_sock_flow_table, sock_table); 70 rcu_assign_pointer(rps_sock_flow_table, sock_table);
71 if (sock_table) 71 if (sock_table)
72 jump_label_inc(&rps_needed); 72 static_key_slow_inc(&rps_needed);
73 if (orig_sock_table) { 73 if (orig_sock_table) {
74 jump_label_dec(&rps_needed); 74 static_key_slow_dec(&rps_needed);
75 synchronize_rcu(); 75 synchronize_rcu();
76 vfree(orig_sock_table); 76 vfree(orig_sock_table);
77 } 77 }
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index 86f3b885b4f3..c48adc565e92 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -1857,11 +1857,6 @@ static int cipso_v4_genopt(unsigned char *buf, u32 buf_len,
1857 return CIPSO_V4_HDR_LEN + ret_val; 1857 return CIPSO_V4_HDR_LEN + ret_val;
1858} 1858}
1859 1859
1860static void opt_kfree_rcu(struct rcu_head *head)
1861{
1862 kfree(container_of(head, struct ip_options_rcu, rcu));
1863}
1864
1865/** 1860/**
1866 * cipso_v4_sock_setattr - Add a CIPSO option to a socket 1861 * cipso_v4_sock_setattr - Add a CIPSO option to a socket
1867 * @sk: the socket 1862 * @sk: the socket
@@ -1938,7 +1933,7 @@ int cipso_v4_sock_setattr(struct sock *sk,
1938 } 1933 }
1939 rcu_assign_pointer(sk_inet->inet_opt, opt); 1934 rcu_assign_pointer(sk_inet->inet_opt, opt);
1940 if (old) 1935 if (old)
1941 call_rcu(&old->rcu, opt_kfree_rcu); 1936 kfree_rcu(old, rcu);
1942 1937
1943 return 0; 1938 return 0;
1944 1939
@@ -2005,7 +2000,7 @@ int cipso_v4_req_setattr(struct request_sock *req,
2005 req_inet = inet_rsk(req); 2000 req_inet = inet_rsk(req);
2006 opt = xchg(&req_inet->opt, opt); 2001 opt = xchg(&req_inet->opt, opt);
2007 if (opt) 2002 if (opt)
2008 call_rcu(&opt->rcu, opt_kfree_rcu); 2003 kfree_rcu(opt, rcu);
2009 2004
2010 return 0; 2005 return 0;
2011 2006
@@ -2075,7 +2070,7 @@ static int cipso_v4_delopt(struct ip_options_rcu **opt_ptr)
2075 * remove the entire option struct */ 2070 * remove the entire option struct */
2076 *opt_ptr = NULL; 2071 *opt_ptr = NULL;
2077 hdr_delta = opt->opt.optlen; 2072 hdr_delta = opt->opt.optlen;
2078 call_rcu(&opt->rcu, opt_kfree_rcu); 2073 kfree_rcu(opt, rcu);
2079 } 2074 }
2080 2075
2081 return hdr_delta; 2076 return hdr_delta;
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index ca50d9f9f8c1..2fd0fba77124 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -445,11 +445,6 @@ out:
445} 445}
446 446
447 447
448static void opt_kfree_rcu(struct rcu_head *head)
449{
450 kfree(container_of(head, struct ip_options_rcu, rcu));
451}
452
453/* 448/*
454 * Socket option code for IP. This is the end of the line after any 449 * Socket option code for IP. This is the end of the line after any
455 * TCP,UDP etc options on an IP socket. 450 * TCP,UDP etc options on an IP socket.
@@ -526,7 +521,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
526 } 521 }
527 rcu_assign_pointer(inet->inet_opt, opt); 522 rcu_assign_pointer(inet->inet_opt, opt);
528 if (old) 523 if (old)
529 call_rcu(&old->rcu, opt_kfree_rcu); 524 kfree_rcu(old, rcu);
530 break; 525 break;
531 } 526 }
532 case IP_PKTINFO: 527 case IP_PKTINFO:
diff --git a/net/ipv4/tcp_memcontrol.c b/net/ipv4/tcp_memcontrol.c
index 49978788a9dc..e795272fbe9e 100644
--- a/net/ipv4/tcp_memcontrol.c
+++ b/net/ipv4/tcp_memcontrol.c
@@ -94,7 +94,7 @@ create_files:
94} 94}
95EXPORT_SYMBOL(tcp_init_cgroup); 95EXPORT_SYMBOL(tcp_init_cgroup);
96 96
97void tcp_destroy_cgroup(struct cgroup *cgrp, struct cgroup_subsys *ss) 97void tcp_destroy_cgroup(struct cgroup *cgrp)
98{ 98{
99 struct mem_cgroup *memcg = mem_cgroup_from_cont(cgrp); 99 struct mem_cgroup *memcg = mem_cgroup_from_cont(cgrp);
100 struct cg_proto *cg_proto; 100 struct cg_proto *cg_proto;
@@ -111,7 +111,7 @@ void tcp_destroy_cgroup(struct cgroup *cgrp, struct cgroup_subsys *ss)
111 val = res_counter_read_u64(&tcp->tcp_memory_allocated, RES_LIMIT); 111 val = res_counter_read_u64(&tcp->tcp_memory_allocated, RES_LIMIT);
112 112
113 if (val != RESOURCE_MAX) 113 if (val != RESOURCE_MAX)
114 jump_label_dec(&memcg_socket_limit_enabled); 114 static_key_slow_dec(&memcg_socket_limit_enabled);
115} 115}
116EXPORT_SYMBOL(tcp_destroy_cgroup); 116EXPORT_SYMBOL(tcp_destroy_cgroup);
117 117
@@ -143,9 +143,9 @@ static int tcp_update_limit(struct mem_cgroup *memcg, u64 val)
143 net->ipv4.sysctl_tcp_mem[i]); 143 net->ipv4.sysctl_tcp_mem[i]);
144 144
145 if (val == RESOURCE_MAX && old_lim != RESOURCE_MAX) 145 if (val == RESOURCE_MAX && old_lim != RESOURCE_MAX)
146 jump_label_dec(&memcg_socket_limit_enabled); 146 static_key_slow_dec(&memcg_socket_limit_enabled);
147 else if (old_lim == RESOURCE_MAX && val != RESOURCE_MAX) 147 else if (old_lim == RESOURCE_MAX && val != RESOURCE_MAX)
148 jump_label_inc(&memcg_socket_limit_enabled); 148 static_key_slow_inc(&memcg_socket_limit_enabled);
149 149
150 return 0; 150 return 0;
151} 151}
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index 253695d43fd9..6b9d5a0e42f9 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -122,7 +122,6 @@ static int __init ircomm_tty_init(void)
122 return -ENOMEM; 122 return -ENOMEM;
123 } 123 }
124 124
125 driver->owner = THIS_MODULE;
126 driver->driver_name = "ircomm"; 125 driver->driver_name = "ircomm";
127 driver->name = "ircomm"; 126 driver->name = "ircomm";
128 driver->major = IRCOMM_TTY_MAJOR; 127 driver->major = IRCOMM_TTY_MAJOR;
@@ -366,16 +365,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
366static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) 365static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
367{ 366{
368 struct ircomm_tty_cb *self; 367 struct ircomm_tty_cb *self;
369 unsigned int line; 368 unsigned int line = tty->index;
370 unsigned long flags; 369 unsigned long flags;
371 int ret; 370 int ret;
372 371
373 IRDA_DEBUG(2, "%s()\n", __func__ ); 372 IRDA_DEBUG(2, "%s()\n", __func__ );
374 373
375 line = tty->index;
376 if (line >= IRCOMM_TTY_PORTS)
377 return -ENODEV;
378
379 /* Check if instance already exists */ 374 /* Check if instance already exists */
380 self = hashbin_lock_find(ircomm_tty, line, NULL); 375 self = hashbin_lock_find(ircomm_tty, line, NULL);
381 if (!self) { 376 if (!self) {
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index be1361b5f7ad..49aaefd99635 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -413,12 +413,6 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data
413 return NULL; 413 return NULL;
414} 414}
415 415
416static void mesh_gate_node_reclaim(struct rcu_head *rp)
417{
418 struct mpath_node *node = container_of(rp, struct mpath_node, rcu);
419 kfree(node);
420}
421
422/** 416/**
423 * mesh_path_add_gate - add the given mpath to a mesh gate to our path table 417 * mesh_path_add_gate - add the given mpath to a mesh gate to our path table
424 * @mpath: gate path to add to table 418 * @mpath: gate path to add to table
@@ -479,7 +473,7 @@ static int mesh_gate_del(struct mesh_table *tbl, struct mesh_path *mpath)
479 if (gate->mpath == mpath) { 473 if (gate->mpath == mpath) {
480 spin_lock_bh(&tbl->gates_lock); 474 spin_lock_bh(&tbl->gates_lock);
481 hlist_del_rcu(&gate->list); 475 hlist_del_rcu(&gate->list);
482 call_rcu(&gate->rcu, mesh_gate_node_reclaim); 476 kfree_rcu(gate, rcu);
483 spin_unlock_bh(&tbl->gates_lock); 477 spin_unlock_bh(&tbl->gates_lock);
484 mpath->sdata->u.mesh.num_gates--; 478 mpath->sdata->u.mesh.num_gates--;
485 mpath->is_gate = false; 479 mpath->is_gate = false;
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index b4e8ff05b301..e1b7e051332e 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -56,7 +56,7 @@ struct list_head nf_hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS] __read_mostly;
56EXPORT_SYMBOL(nf_hooks); 56EXPORT_SYMBOL(nf_hooks);
57 57
58#if defined(CONFIG_JUMP_LABEL) 58#if defined(CONFIG_JUMP_LABEL)
59struct jump_label_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; 59struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
60EXPORT_SYMBOL(nf_hooks_needed); 60EXPORT_SYMBOL(nf_hooks_needed);
61#endif 61#endif
62 62
@@ -77,7 +77,7 @@ int nf_register_hook(struct nf_hook_ops *reg)
77 list_add_rcu(&reg->list, elem->list.prev); 77 list_add_rcu(&reg->list, elem->list.prev);
78 mutex_unlock(&nf_hook_mutex); 78 mutex_unlock(&nf_hook_mutex);
79#if defined(CONFIG_JUMP_LABEL) 79#if defined(CONFIG_JUMP_LABEL)
80 jump_label_inc(&nf_hooks_needed[reg->pf][reg->hooknum]); 80 static_key_slow_inc(&nf_hooks_needed[reg->pf][reg->hooknum]);
81#endif 81#endif
82 return 0; 82 return 0;
83} 83}
@@ -89,7 +89,7 @@ void nf_unregister_hook(struct nf_hook_ops *reg)
89 list_del_rcu(&reg->list); 89 list_del_rcu(&reg->list);
90 mutex_unlock(&nf_hook_mutex); 90 mutex_unlock(&nf_hook_mutex);
91#if defined(CONFIG_JUMP_LABEL) 91#if defined(CONFIG_JUMP_LABEL)
92 jump_label_dec(&nf_hooks_needed[reg->pf][reg->hooknum]); 92 static_key_slow_dec(&nf_hooks_needed[reg->pf][reg->hooknum]);
93#endif 93#endif
94 synchronize_net(); 94 synchronize_net();
95} 95}
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index f84fdc3a7f27..1afaa284fcd7 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -22,9 +22,8 @@
22#include <net/sock.h> 22#include <net/sock.h>
23#include <net/cls_cgroup.h> 23#include <net/cls_cgroup.h>
24 24
25static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, 25static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp);
26 struct cgroup *cgrp); 26static void cgrp_destroy(struct cgroup *cgrp);
27static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
28static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp); 27static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp);
29 28
30struct cgroup_subsys net_cls_subsys = { 29struct cgroup_subsys net_cls_subsys = {
@@ -51,8 +50,7 @@ static inline struct cgroup_cls_state *task_cls_state(struct task_struct *p)
51 struct cgroup_cls_state, css); 50 struct cgroup_cls_state, css);
52} 51}
53 52
54static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, 53static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp)
55 struct cgroup *cgrp)
56{ 54{
57 struct cgroup_cls_state *cs; 55 struct cgroup_cls_state *cs;
58 56
@@ -66,7 +64,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss,
66 return &cs->css; 64 return &cs->css;
67} 65}
68 66
69static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) 67static void cgrp_destroy(struct cgroup *cgrp)
70{ 68{
71 kfree(cgrp_cls_state(cgrp)); 69 kfree(cgrp_cls_state(cgrp));
72} 70}