92 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
94 #include <linux/capability.h>
95 #include <linux/errno.h>
96 #include <linux/types.h>
97 #include <linux/socket.h>
99 #include <linux/kernel.h>
100 #include <linux/module.h>
103 #include <linux/sched.h>
105 #include <linux/string.h>
107 #include <linux/net.h>
109 #include <linux/slab.h>
111 #include <linux/poll.h>
112 #include <linux/tcp.h>
118 #include <linux/prefetch.h>
120 #include <asm/uaccess.h>
122 #include <linux/netdevice.h>
134 #include <linux/filter.h>
145 #ifdef CONFIG_MEMCG_KMEM
146 int mem_cgroup_sockets_init(
struct mem_cgroup *memcg,
struct cgroup_subsys *
ss)
153 if (proto->init_cgroup) {
154 ret = proto->init_cgroup(memcg, ss);
164 if (proto->destroy_cgroup)
165 proto->destroy_cgroup(memcg);
176 if (proto->destroy_cgroup)
177 proto->destroy_cgroup(memcg);
197 static const char *
const af_family_key_strings[
AF_MAX+1] = {
198 "sk_lock-AF_UNSPEC",
"sk_lock-AF_UNIX" ,
"sk_lock-AF_INET" ,
199 "sk_lock-AF_AX25" ,
"sk_lock-AF_IPX" ,
"sk_lock-AF_APPLETALK",
200 "sk_lock-AF_NETROM",
"sk_lock-AF_BRIDGE" ,
"sk_lock-AF_ATMPVC" ,
201 "sk_lock-AF_X25" ,
"sk_lock-AF_INET6" ,
"sk_lock-AF_ROSE" ,
202 "sk_lock-AF_DECnet",
"sk_lock-AF_NETBEUI" ,
"sk_lock-AF_SECURITY" ,
203 "sk_lock-AF_KEY" ,
"sk_lock-AF_NETLINK" ,
"sk_lock-AF_PACKET" ,
204 "sk_lock-AF_ASH" ,
"sk_lock-AF_ECONET" ,
"sk_lock-AF_ATMSVC" ,
205 "sk_lock-AF_RDS" ,
"sk_lock-AF_SNA" ,
"sk_lock-AF_IRDA" ,
206 "sk_lock-AF_PPPOX" ,
"sk_lock-AF_WANPIPE" ,
"sk_lock-AF_LLC" ,
207 "sk_lock-27" ,
"sk_lock-28" ,
"sk_lock-AF_CAN" ,
208 "sk_lock-AF_TIPC" ,
"sk_lock-AF_BLUETOOTH",
"sk_lock-IUCV" ,
209 "sk_lock-AF_RXRPC" ,
"sk_lock-AF_ISDN" ,
"sk_lock-AF_PHONET" ,
210 "sk_lock-AF_IEEE802154",
"sk_lock-AF_CAIF" ,
"sk_lock-AF_ALG" ,
211 "sk_lock-AF_NFC" ,
"sk_lock-AF_MAX"
213 static const char *
const af_family_slock_key_strings[
AF_MAX+1] = {
214 "slock-AF_UNSPEC",
"slock-AF_UNIX" ,
"slock-AF_INET" ,
215 "slock-AF_AX25" ,
"slock-AF_IPX" ,
"slock-AF_APPLETALK",
216 "slock-AF_NETROM",
"slock-AF_BRIDGE" ,
"slock-AF_ATMPVC" ,
217 "slock-AF_X25" ,
"slock-AF_INET6" ,
"slock-AF_ROSE" ,
218 "slock-AF_DECnet",
"slock-AF_NETBEUI" ,
"slock-AF_SECURITY" ,
219 "slock-AF_KEY" ,
"slock-AF_NETLINK" ,
"slock-AF_PACKET" ,
220 "slock-AF_ASH" ,
"slock-AF_ECONET" ,
"slock-AF_ATMSVC" ,
221 "slock-AF_RDS" ,
"slock-AF_SNA" ,
"slock-AF_IRDA" ,
222 "slock-AF_PPPOX" ,
"slock-AF_WANPIPE" ,
"slock-AF_LLC" ,
223 "slock-27" ,
"slock-28" ,
"slock-AF_CAN" ,
224 "slock-AF_TIPC" ,
"slock-AF_BLUETOOTH",
"slock-AF_IUCV" ,
225 "slock-AF_RXRPC" ,
"slock-AF_ISDN" ,
"slock-AF_PHONET" ,
226 "slock-AF_IEEE802154",
"slock-AF_CAIF" ,
"slock-AF_ALG" ,
227 "slock-AF_NFC" ,
"slock-AF_MAX"
229 static const char *
const af_family_clock_key_strings[
AF_MAX+1] = {
230 "clock-AF_UNSPEC",
"clock-AF_UNIX" ,
"clock-AF_INET" ,
231 "clock-AF_AX25" ,
"clock-AF_IPX" ,
"clock-AF_APPLETALK",
232 "clock-AF_NETROM",
"clock-AF_BRIDGE" ,
"clock-AF_ATMPVC" ,
233 "clock-AF_X25" ,
"clock-AF_INET6" ,
"clock-AF_ROSE" ,
234 "clock-AF_DECnet",
"clock-AF_NETBEUI" ,
"clock-AF_SECURITY" ,
235 "clock-AF_KEY" ,
"clock-AF_NETLINK" ,
"clock-AF_PACKET" ,
236 "clock-AF_ASH" ,
"clock-AF_ECONET" ,
"clock-AF_ATMSVC" ,
237 "clock-AF_RDS" ,
"clock-AF_SNA" ,
"clock-AF_IRDA" ,
238 "clock-AF_PPPOX" ,
"clock-AF_WANPIPE" ,
"clock-AF_LLC" ,
239 "clock-27" ,
"clock-28" ,
"clock-AF_CAN" ,
240 "clock-AF_TIPC" ,
"clock-AF_BLUETOOTH",
"clock-AF_IUCV" ,
241 "clock-AF_RXRPC" ,
"clock-AF_ISDN" ,
"clock-AF_PHONET" ,
242 "clock-AF_IEEE802154",
"clock-AF_CAIF" ,
"clock-AF_ALG" ,
243 "clock-AF_NFC" ,
"clock-AF_MAX"
257 #define _SK_MEM_PACKETS 256
258 #define _SK_MEM_OVERHEAD SKB_TRUESIZE(256)
259 #define SK_WMEM_MAX (_SK_MEM_OVERHEAD * _SK_MEM_PACKETS)
260 #define SK_RMEM_MAX (_SK_MEM_OVERHEAD * _SK_MEM_PACKETS)
289 static_key_slow_inc(&memalloc_socks);
297 static_key_slow_dec(&memalloc_socks);
316 unsigned long pflags =
current->flags;
329 static int sock_set_timeout(
long *timeo_p,
char __user *optval,
int optlen)
333 if (optlen <
sizeof(tv))
346 pr_info(
"%s: `%s' (pid %d) tries to set negative timeout\n",
352 if (tv.tv_sec == 0 && tv.tv_usec == 0)
355 *timeo_p = tv.tv_sec*
HZ + (tv.tv_usec+(1000000/
HZ-1))/(1000000/
HZ);
359 static void sock_warn_obsolete_bsdism(
const char *
name)
365 pr_warn(
"process `%s' is using obsolete %s SO_BSDCOMPAT\n",
371 #define SK_FLAGS_TIMESTAMP ((1UL << SOCK_TIMESTAMP) | (1UL << SOCK_TIMESTAMPING_RX_SOFTWARE))
373 static void sock_disable_timestamp(
struct sock *
sk,
unsigned long flags)
392 trace_sock_rcvqueue_full(sk, skb);
400 if (!sk_rmem_schedule(sk, skb, skb->
truesize)) {
406 skb_set_owner_r(skb, sk);
422 __skb_queue_tail(list, skb);
423 spin_unlock_irqrestore(&list->
lock, flags);
436 goto discard_and_relse;
440 if (sk_rcvqueues_full(sk, skb, sk->
sk_rcvbuf)) {
442 goto discard_and_relse;
454 rc = sk_backlog_rcv(sk, skb);
457 }
else if (sk_add_backlog(sk, skb, sk->
sk_rcvbuf)) {
460 goto discard_and_relse;
475 sk_tx_queue_clear(sk);
484 sk_tx_queue_clear(sk);
508 static int sock_bindtodevice(
struct sock *
sk,
char __user *optval,
int optlen)
511 #ifdef CONFIG_NETDEVICES
512 struct net *
net = sock_net(sk);
532 memset(devname, 0,
sizeof(devname));
539 if (devname[0] !=
'\0') {
553 sk->sk_bound_dev_if =
index;
565 static inline void sock_valbool_flag(
struct sock *sk,
int bit,
int valbool)
568 sock_set_flag(sk, bit);
570 sock_reset_flag(sk, bit);
579 char __user *optval,
unsigned int optlen)
581 struct sock *sk = sock->
sk;
592 return sock_bindtodevice(sk, optval, optlen);
594 if (optlen <
sizeof(
int))
600 valbool = val ? 1 : 0;
609 sock_valbool_flag(sk,
SOCK_DBG, valbool);
706 if (optlen <
sizeof(ling)) {
717 #if (BITS_PER_LONG == 32)
728 sock_warn_obsolete_bsdism(
"setsockopt");
768 sock_disable_timestamp(sk,
785 ret = sock_set_timeout(&sk->
sk_rcvtimeo, optval, optlen);
789 ret = sock_set_timeout(&sk->
sk_sndtimeo, optval, optlen);
833 if (sock->
ops->set_peek_off)
834 sock->
ops->set_peek_off(sk, val);
857 ucred->
uid = ucred->
gid = -1;
868 char __user *optval,
int __user *optlen)
870 struct sock *sk = sock->
sk;
878 int lv =
sizeof(
int);
910 v.val = sk->sk_reuse;
926 v.val = sk->sk_family;
930 v.val = -sock_error(sk);
954 sock_warn_obsolete_bsdism(
"getsockopt");
1020 struct ucred peercred;
1021 if (len >
sizeof(peercred))
1022 len =
sizeof(peercred);
1033 if (sock->
ops->getname(sock, (
struct sockaddr *)address, &lv, 2))
1054 return security_socket_getpeersec_stream(sock, optval, optlen, len);
1069 if (!sock->
ops->set_peek_off)
1096 static inline void sock_lock_init(
struct sock *sk)
1099 af_family_slock_key_strings[sk->sk_family],
1100 af_family_slock_keys + sk->sk_family,
1101 af_family_key_strings[sk->sk_family],
1102 af_family_keys + sk->sk_family);
1110 static void sock_copy(
struct sock *nsk,
const struct sock *osk)
1112 #ifdef CONFIG_SECURITY_NETWORK
1113 void *sptr = nsk->sk_security;
1117 memcpy(&nsk->sk_dontcopy_end, &osk->sk_dontcopy_end,
1120 #ifdef CONFIG_SECURITY_NETWORK
1121 nsk->sk_security = sptr;
1122 security_sk_clone(osk, nsk);
1130 static inline void sk_prot_clear_nulls(
struct sock *sk,
int size)
1134 memset(&sk->sk_node.pprev, 0,
1140 unsigned long nulls1, nulls2;
1142 nulls1 =
offsetof(
struct sock, __sk_common.skc_node.next);
1143 nulls2 =
offsetof(
struct sock, __sk_common.skc_portaddr_node.next);
1144 if (nulls1 > nulls2)
1145 swap(nulls1, nulls2);
1148 memset((
char *)sk, 0, nulls1);
1149 memset((
char *)sk + nulls1 +
sizeof(
void *), 0,
1150 nulls2 - nulls1 -
sizeof(
void *));
1151 memset((
char *)sk + nulls2 +
sizeof(
void *), 0,
1152 size - nulls2 -
sizeof(
void *));
1171 sk_prot_clear_nulls(sk, prot->
obj_size);
1179 if (security_sk_alloc(sk, family, priority))
1182 if (!try_module_get(prot->
owner))
1184 sk_tx_queue_clear(sk);
1190 security_sk_free(sk);
1199 static void sk_prot_free(
struct proto *prot,
struct sock *sk)
1204 owner = prot->
owner;
1207 security_sk_free(sk);
1215 #ifdef CONFIG_CGROUPS
1216 #if IS_ENABLED(CONFIG_NET_CLS_CGROUP)
1217 void sock_update_classid(
struct sock *sk)
1222 classid = task_cls_classid(
current);
1230 #if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
1236 sk->sk_cgrp_prioidx = task_netprioidx(task);
1254 sk = sk_prot_alloc(prot, priority | __GFP_ZERO, family);
1263 sock_net_set(sk, get_net(net));
1266 sock_update_classid(sk);
1274 static void __sk_free(
struct sock *sk)
1284 sk_filter_uncharge(sk, filter);
1291 pr_debug(
"%s: optmem leakage (%d bytes) detected\n",
1297 put_net(sock_net(sk));
1327 release_net(sock_net(sk));
1328 sock_net_set(sk, get_net(&
init_net));
1333 static void sk_update_clone(
const struct sock *sk,
struct sock *newsk)
1336 sock_update_memcg(newsk);
1350 newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
1351 if (newsk !=
NULL) {
1354 sock_copy(newsk, sk);
1357 get_net(sock_net(newsk));
1358 sk_node_init(&newsk->sk_node);
1359 sock_lock_init(newsk);
1372 #ifdef CONFIG_NET_DMA
1373 skb_queue_head_init(&newsk->sk_async_wait_queue);
1379 af_callback_keys + newsk->sk_family,
1380 af_family_clock_key_strings[newsk->sk_family]);
1393 sk_filter_charge(newsk, filter);
1395 if (
unlikely(xfrm_sk_clone_policy(newsk))) {
1426 sk_set_socket(newsk,
NULL);
1429 sk_update_clone(sk, newsk);
1431 if (newsk->sk_prot->sockets_allocated)
1432 sk_sockets_allocated_inc(newsk);
1444 __sk_dst_set(sk, dst);
1449 if (sk_can_gso(sk)) {
1471 struct sock *sk = skb->
sk;
1497 struct sock *sk = skb->
sk;
1501 sk_mem_uncharge(sk, len);
1507 struct sock *sk = skb->
sk;
1547 struct sk_buff *
skb = alloc_skb(size, priority);
1549 skb_set_owner_w(skb, sk);
1564 struct sk_buff *
skb = alloc_skb(size, priority);
1566 skb_set_owner_r(skb, sk);
1585 mem =
kmalloc(size, priority);
1607 static long sock_wait_for_wmem(
struct sock *sk,
long timeo)
1637 unsigned long data_len,
int noblock,
1654 timeo = sock_sndtimeo(sk, noblock);
1656 err = sock_error(sk);
1665 skb = alloc_skb(header_len, gfp_mask);
1674 skb_shinfo(skb)->nr_frags = npages;
1675 for (i = 0; i < npages; i++) {
1681 skb_shinfo(skb)->nr_frags =
i;
1686 __skb_fill_page_desc(skb, i,
1707 timeo = sock_wait_for_wmem(sk, timeo);
1710 skb_set_owner_w(skb, sk);
1714 err = sock_intr_errno(timeo);
1729 #define SKB_FRAG_PAGE_ORDER get_order(32768)
1759 }
while (--order >= 0);
1761 sk_enter_memory_pressure(sk);
1762 sk_stream_moderate_sndbuf(sk);
1767 static void __lock_sock(
struct sock *sk)
1785 static void __release_sock(
struct sock *sk)
1801 sk_backlog_rcv(sk, skb);
1812 }
while (skb !=
NULL);
1860 struct proto *prot = sk->sk_prot;
1861 int amt = sk_mem_pages(size);
1867 allocated = sk_memory_allocated_add(sk, amt, &parent_status);
1871 allocated <= sk_prot_mem_limits(sk, 0)) {
1872 sk_leave_memory_pressure(sk);
1878 allocated > sk_prot_mem_limits(sk, 1))
1879 sk_enter_memory_pressure(sk);
1883 (allocated > sk_prot_mem_limits(sk, 2)))
1884 goto suppress_allocation;
1900 if (sk_has_memory_pressure(sk)) {
1903 if (!sk_under_memory_pressure(sk))
1905 alloc = sk_sockets_allocated_read_positive(sk);
1906 if (sk_prot_mem_limits(sk, 2) > alloc *
1913 suppress_allocation:
1916 sk_stream_moderate_sndbuf(sk);
1925 trace_sock_exceed_buf_limit(sk, prot, allocated);
1930 sk_memory_allocated_sub(sk, amt);
1942 sk_memory_allocated_sub(sk,
1946 if (sk_under_memory_pressure(sk) &&
1947 (sk_memory_allocated(sk) < sk_prot_mem_limits(sk, 0)))
1948 sk_leave_memory_pressure(sk);
2017 char __user *optval,
unsigned int optlen)
2024 char __user *optval,
int __user *optlen)
2038 size_t len,
int flags)
2056 char *kaddr =
kmap(page);
2069 static void sock_def_wakeup(
struct sock *sk)
2075 if (wq_has_sleeper(wq))
2080 static void sock_def_error_report(
struct sock *sk)
2086 if (wq_has_sleeper(wq))
2092 static void sock_def_readable(
struct sock *sk,
int len)
2098 if (wq_has_sleeper(wq))
2105 static void sock_def_write_space(
struct sock *sk)
2116 if (wq_has_sleeper(wq))
2121 if (sock_writeable(sk))
2128 static void sock_def_destruct(
struct sock *sk)
2142 unsigned long expires)
2151 if (timer_pending(timer) &&
del_timer(timer))
2161 #ifdef CONFIG_NET_DMA
2162 skb_queue_head_init(&sk->sk_async_wait_queue);
2173 sk_set_socket(sk, sock);
2187 af_callback_keys + sk->sk_family,
2188 af_family_clock_key_strings[sk->sk_family]);
2246 if (sk->sk_prot->release_cb)
2247 sk->sk_prot->release_cb(sk);
2294 tv = ktime_to_timeval(sk->
sk_stamp);
2299 tv = ktime_to_timeval(sk->
sk_stamp);
2310 ts = ktime_to_timespec(sk->
sk_stamp);
2315 ts = ktime_to_timespec(sk->
sk_stamp);
2323 if (!sock_flag(sk, flag)) {
2324 unsigned long previous_flags = sk->
sk_flags;
2326 sock_set_flag(sk, flag);
2345 char __user *optval,
int __user *optlen)
2347 struct sock *sk = sock->
sk;
2349 return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
2353 #ifdef CONFIG_COMPAT
2355 char __user *optval,
int __user *optlen)
2357 struct sock *sk = sock->
sk;
2359 if (sk->sk_prot->compat_getsockopt !=
NULL)
2360 return sk->sk_prot->compat_getsockopt(sk, level, optname,
2362 return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
2370 struct sock *sk = sock->
sk;
2374 err = sk->sk_prot->recvmsg(iocb, sk, msg, size, flags &
MSG_DONTWAIT,
2375 flags & ~MSG_DONTWAIT, &addr_len);
2386 char __user *optval,
unsigned int optlen)
2388 struct sock *sk = sock->
sk;
2390 return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen);
2394 #ifdef CONFIG_COMPAT
2396 char __user *optval,
unsigned int optlen)
2398 struct sock *sk = sock->
sk;
2400 if (sk->sk_prot->compat_setsockopt !=
NULL)
2401 return sk->sk_prot->compat_setsockopt(sk, level, optname,
2403 return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen);
2410 if (sk->sk_prot->destroy)
2411 sk->sk_prot->destroy(sk);
2421 sk->sk_prot->unhash(sk);
2437 xfrm_sk_free_policy(sk);
2450 #ifdef CONFIG_PROC_FS
2451 #define PROTO_INUSE_NR 64
2453 int val[PROTO_INUSE_NR];
2458 #ifdef CONFIG_NET_NS
2459 void sock_prot_inuse_add(
struct net *net,
struct proto *prot,
int val)
2465 int sock_prot_inuse_get(
struct net *net,
struct proto *prot)
2467 int cpu,
idx = prot->inuse_idx;
2473 return res >= 0 ? res : 0;
2480 return net->core.inuse ? 0 : -
ENOMEM;
2483 static void __net_exit sock_inuse_exit_net(
struct net *net)
2489 .
init = sock_inuse_init_net,
2490 .exit = sock_inuse_exit_net,
2493 static __init int net_inuse_init(
void)
2496 panic(
"Cannot initialize net inuse counters");
2505 void sock_prot_inuse_add(
struct net *net,
struct proto *prot,
int val)
2511 int sock_prot_inuse_get(
struct net *net,
struct proto *prot)
2513 int cpu, idx = prot->inuse_idx;
2519 return res >= 0 ? res : 0;
2524 static void assign_proto_idx(
struct proto *prot)
2528 if (
unlikely(prot->inuse_idx == PROTO_INUSE_NR - 1)) {
2529 pr_err(
"PROTO_INUSE_NR exhausted\n");
2533 set_bit(prot->inuse_idx, proto_inuse_idx);
2536 static void release_proto_idx(
struct proto *prot)
2538 if (prot->inuse_idx != PROTO_INUSE_NR - 1)
2539 clear_bit(prot->inuse_idx, proto_inuse_idx);
2542 static inline void assign_proto_idx(
struct proto *prot)
2546 static inline void release_proto_idx(
struct proto *prot)
2559 pr_crit(
"%s: Can't create sock SLAB cache!\n",
2567 goto out_free_sock_slab;
2574 pr_crit(
"%s: Can't create request sock SLAB cache!\n",
2576 goto out_free_request_sock_slab_name;
2584 goto out_free_request_sock_slab;
2594 goto out_free_timewait_sock_slab_name;
2599 list_add(&prot->
node, &proto_list);
2600 assign_proto_idx(prot);
2604 out_free_timewait_sock_slab_name:
2606 out_free_request_sock_slab:
2611 out_free_request_sock_slab_name:
2625 release_proto_idx(prot);
2648 #ifdef CONFIG_PROC_FS
2649 static void *proto_seq_start(
struct seq_file *seq, loff_t *
pos)
2656 static void *proto_seq_next(
struct seq_file *seq,
void *
v, loff_t *
pos)
2661 static void proto_seq_stop(
struct seq_file *seq,
void *
v)
2667 static char proto_method_implemented(
const void *
method)
2669 return method ==
NULL ?
'n' :
'y';
2671 static long sock_prot_memory_allocated(
struct proto *proto)
2676 static char *sock_prot_memory_pressure(
struct proto *proto)
2679 proto_memory_pressure(proto) ?
"yes" :
"no" :
"NI";
2682 static void proto_seq_printf(
struct seq_file *seq,
struct proto *proto)
2685 seq_printf(seq,
"%-9s %4u %6d %6ld %-3s %6u %-3s %-10s "
2686 "%2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c\n",
2689 sock_prot_inuse_get(seq_file_net(seq), proto),
2690 sock_prot_memory_allocated(proto),
2691 sock_prot_memory_pressure(proto),
2693 proto->
slab ==
NULL ?
"no" :
"yes",
2695 proto_method_implemented(proto->
close),
2696 proto_method_implemented(proto->
connect),
2698 proto_method_implemented(proto->
accept),
2699 proto_method_implemented(proto->
ioctl),
2700 proto_method_implemented(proto->
init),
2701 proto_method_implemented(proto->
destroy),
2702 proto_method_implemented(proto->
shutdown),
2705 proto_method_implemented(proto->
sendmsg),
2706 proto_method_implemented(proto->
recvmsg),
2707 proto_method_implemented(proto->
sendpage),
2708 proto_method_implemented(proto->
bind),
2710 proto_method_implemented(proto->
hash),
2711 proto_method_implemented(proto->
unhash),
2712 proto_method_implemented(proto->
get_port),
2716 static int proto_seq_show(
struct seq_file *seq,
void *
v)
2718 if (v == &proto_list)
2719 seq_printf(seq,
"%-9s %-4s %-8s %-6s %-5s %-7s %-4s %-10s %s",
2728 "cl co di ac io in de sh ss gs se re sp bi br ha uh gp em\n");
2735 .
start = proto_seq_start,
2736 .next = proto_seq_next,
2737 .stop = proto_seq_stop,
2738 .show = proto_seq_show,
2749 .open = proto_seq_open,
2755 static __net_init int proto_init_net(
struct net *net)
2763 static __net_exit void proto_exit_net(
struct net *net)
2770 .
init = proto_init_net,
2771 .exit = proto_exit_net,
2774 static int __init proto_init(
void)