diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-11-22 14:05:46 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-22 14:05:46 -0500 |
commit | 515db09338704a6ad7d27b5f1e33820d3052edd2 (patch) | |
tree | 74f915531710303397d34069b325c2be7a5ac93c /net | |
parent | 30be52e44fd4276d768efffb55d424fb682e6505 (diff) | |
parent | cfcfc9eca2bcbd26a8e206baeb005b055dbf8e37 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Conflicts:
drivers/net/wireless/iwlegacy/iwl-debugfs.c
drivers/net/wireless/iwlegacy/iwl-rx.c
drivers/net/wireless/iwlegacy/iwl-scan.c
drivers/net/wireless/iwlegacy/iwl-tx.c
include/net/bluetooth/bluetooth.h
Diffstat (limited to 'net')
209 files changed, 682 insertions, 345 deletions
diff --git a/net/802/fc.c b/net/802/fc.c index 1e49f2d4ea96..bd345f3d29f8 100644 --- a/net/802/fc.c +++ b/net/802/fc.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/net.h> | 27 | #include <linux/net.h> |
28 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/export.h> | ||
30 | #include <net/arp.h> | 31 | #include <net/arp.h> |
31 | 32 | ||
32 | /* | 33 | /* |
diff --git a/net/802/garp.c b/net/802/garp.c index 070bf4403bf8..8e21b6db3981 100644 --- a/net/802/garp.c +++ b/net/802/garp.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/rtnetlink.h> | 15 | #include <linux/rtnetlink.h> |
16 | #include <linux/llc.h> | 16 | #include <linux/llc.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/module.h> | ||
18 | #include <net/llc.h> | 19 | #include <net/llc.h> |
19 | #include <net/llc_pdu.h> | 20 | #include <net/llc_pdu.h> |
20 | #include <net/garp.h> | 21 | #include <net/garp.h> |
diff --git a/net/802/stp.c b/net/802/stp.c index 0e136ef1e4ba..15540b7323cd 100644 --- a/net/802/stp.c +++ b/net/802/stp.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/etherdevice.h> | 12 | #include <linux/etherdevice.h> |
13 | #include <linux/llc.h> | 13 | #include <linux/llc.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/module.h> | ||
15 | #include <net/llc.h> | 16 | #include <net/llc.h> |
16 | #include <net/llc_pdu.h> | 17 | #include <net/llc_pdu.h> |
17 | #include <net/stp.h> | 18 | #include <net/stp.h> |
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 163397f1fd5a..f5ffc02729d6 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/netdevice.h> | 2 | #include <linux/netdevice.h> |
3 | #include <linux/if_vlan.h> | 3 | #include <linux/if_vlan.h> |
4 | #include <linux/netpoll.h> | 4 | #include <linux/netpoll.h> |
5 | #include <linux/export.h> | ||
5 | #include "vlan.h" | 6 | #include "vlan.h" |
6 | 7 | ||
7 | bool vlan_do_receive(struct sk_buff **skbp, bool last_handler) | 8 | bool vlan_do_receive(struct sk_buff **skbp, bool last_handler) |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index c8cf9391417e..bc2528624583 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -470,10 +470,12 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change) | |||
470 | { | 470 | { |
471 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 471 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; |
472 | 472 | ||
473 | if (change & IFF_ALLMULTI) | 473 | if (dev->flags & IFF_UP) { |
474 | dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1); | 474 | if (change & IFF_ALLMULTI) |
475 | if (change & IFF_PROMISC) | 475 | dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1); |
476 | dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1); | 476 | if (change & IFF_PROMISC) |
477 | dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1); | ||
478 | } | ||
477 | } | 479 | } |
478 | 480 | ||
479 | static void vlan_dev_set_rx_mode(struct net_device *vlan_dev) | 481 | static void vlan_dev_set_rx_mode(struct net_device *vlan_dev) |
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index be9a5c19a775..235c2197dbb6 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/if_vlan.h> | 13 | #include <linux/if_vlan.h> |
14 | #include <linux/module.h> | ||
14 | #include <net/net_namespace.h> | 15 | #include <net/net_namespace.h> |
15 | #include <net/netlink.h> | 16 | #include <net/netlink.h> |
16 | #include <net/rtnetlink.h> | 17 | #include <net/rtnetlink.h> |
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 1acc69576df8..173a2e82f486 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
41 | #include <linux/seq_file.h> | 41 | #include <linux/seq_file.h> |
42 | #include <linux/export.h> | ||
42 | 43 | ||
43 | int sysctl_aarp_expiry_time = AARP_EXPIRY_TIME; | 44 | int sysctl_aarp_expiry_time = AARP_EXPIRY_TIME; |
44 | int sysctl_aarp_tick_time = AARP_TICK_TIME; | 45 | int sysctl_aarp_tick_time = AARP_TICK_TIME; |
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index 6ef0e761e5de..b5b1a221c242 100644 --- a/net/appletalk/atalk_proc.c +++ b/net/appletalk/atalk_proc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <net/net_namespace.h> | 14 | #include <net/net_namespace.h> |
15 | #include <net/sock.h> | 15 | #include <net/sock.h> |
16 | #include <linux/atalk.h> | 16 | #include <linux/atalk.h> |
17 | #include <linux/export.h> | ||
17 | 18 | ||
18 | 19 | ||
19 | static __inline__ struct atalk_iface *atalk_get_interface_idx(loff_t pos) | 20 | static __inline__ struct atalk_iface *atalk_get_interface_idx(loff_t pos) |
diff --git a/net/atm/pvc.c b/net/atm/pvc.c index 437ee70c5e62..3a734919c36c 100644 --- a/net/atm/pvc.c +++ b/net/atm/pvc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
13 | #include <linux/bitops.h> | 13 | #include <linux/bitops.h> |
14 | #include <linux/export.h> | ||
14 | #include <net/sock.h> /* for sock_no_* */ | 15 | #include <net/sock.h> /* for sock_no_* */ |
15 | 16 | ||
16 | #include "resources.h" /* devs and vccs */ | 17 | #include "resources.h" /* devs and vccs */ |
diff --git a/net/atm/svc.c b/net/atm/svc.c index 754ee4791d96..1281049c135f 100644 --- a/net/atm/svc.c +++ b/net/atm/svc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/bitops.h> | 20 | #include <linux/bitops.h> |
21 | #include <net/sock.h> /* for sock_no_* */ | 21 | #include <net/sock.h> /* for sock_no_* */ |
22 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
23 | #include <linux/export.h> | ||
23 | 24 | ||
24 | #include "resources.h" | 25 | #include "resources.h" |
25 | #include "common.h" /* common for PVCs and SVCs */ | 26 | #include "common.h" /* common for PVCs and SVCs */ |
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index a1690845dc6e..87fddab22e0f 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/interrupt.h> | 38 | #include <linux/interrupt.h> |
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/seq_file.h> | 40 | #include <linux/seq_file.h> |
41 | #include <linux/export.h> | ||
41 | 42 | ||
42 | static ax25_route *ax25_route_list; | 43 | static ax25_route *ax25_route_list; |
43 | static DEFINE_RWLOCK(ax25_route_lock); | 44 | static DEFINE_RWLOCK(ax25_route_lock); |
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index d349be9578f5..4c83137b5954 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/stat.h> | 37 | #include <linux/stat.h> |
38 | #include <linux/netfilter.h> | 38 | #include <linux/netfilter.h> |
39 | #include <linux/sysctl.h> | 39 | #include <linux/sysctl.h> |
40 | #include <linux/export.h> | ||
40 | #include <net/ip.h> | 41 | #include <net/ip.h> |
41 | #include <net/arp.h> | 42 | #include <net/arp.h> |
42 | 43 | ||
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index f8e6aa386cef..c62d254a1379 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/debugfs.h> | 6 | #include <linux/debugfs.h> |
7 | #include <linux/seq_file.h> | 7 | #include <linux/seq_file.h> |
8 | #include <linux/module.h> | ||
8 | 9 | ||
9 | #include <net/bluetooth/bluetooth.h> | 10 | #include <net/bluetooth/bluetooth.h> |
10 | #include <net/bluetooth/hci_core.h> | 11 | #include <net/bluetooth/hci_core.h> |
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 567b585d9805..e2e785c74630 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -27,6 +27,7 @@ | |||
27 | /* Bluetooth L2CAP sockets. */ | 27 | /* Bluetooth L2CAP sockets. */ |
28 | 28 | ||
29 | #include <linux/security.h> | 29 | #include <linux/security.h> |
30 | #include <linux/export.h> | ||
30 | 31 | ||
31 | #include <net/bluetooth/bluetooth.h> | 32 | #include <net/bluetooth/bluetooth.h> |
32 | #include <net/bluetooth/hci_core.h> | 33 | #include <net/bluetooth/hci_core.h> |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index a6720c6a4d2c..94739d3c4f59 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -23,6 +23,7 @@ | |||
23 | /* Bluetooth HCI Management interface */ | 23 | /* Bluetooth HCI Management interface */ |
24 | 24 | ||
25 | #include <linux/uaccess.h> | 25 | #include <linux/uaccess.h> |
26 | #include <linux/module.h> | ||
26 | #include <asm/unaligned.h> | 27 | #include <asm/unaligned.h> |
27 | 28 | ||
28 | #include <net/bluetooth/bluetooth.h> | 29 | #include <net/bluetooth/bluetooth.h> |
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 6f9f8c014725..5a31731be4d0 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include <linux/etherdevice.h> | 17 | #include <linux/etherdevice.h> |
18 | #include <linux/netfilter_bridge.h> | 18 | #include <linux/netfilter_bridge.h> |
19 | #include <linux/export.h> | ||
19 | #include "br_private.h" | 20 | #include "br_private.h" |
20 | 21 | ||
21 | /* Bridge group multicast address 802.1d (pg 51). */ | 22 | /* Bridge group multicast address 802.1d (pg 51). */ |
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 10eda3cd1d71..19308e305d85 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/kmod.h> | ||
15 | #include <linux/etherdevice.h> | 16 | #include <linux/etherdevice.h> |
16 | #include <linux/rtnetlink.h> | 17 | #include <linux/rtnetlink.h> |
17 | 18 | ||
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c index bf2a333ca7c7..5449294bdd5e 100644 --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c | |||
@@ -102,16 +102,15 @@ static struct sk_buff *ulog_alloc_skb(unsigned int size) | |||
102 | unsigned int n; | 102 | unsigned int n; |
103 | 103 | ||
104 | n = max(size, nlbufsiz); | 104 | n = max(size, nlbufsiz); |
105 | skb = alloc_skb(n, GFP_ATOMIC); | 105 | skb = alloc_skb(n, GFP_ATOMIC | __GFP_NOWARN); |
106 | if (!skb) { | 106 | if (!skb) { |
107 | pr_debug("cannot alloc whole buffer of size %ub!\n", n); | ||
108 | if (n > size) { | 107 | if (n > size) { |
109 | /* try to allocate only as much as we need for | 108 | /* try to allocate only as much as we need for |
110 | * current packet */ | 109 | * current packet */ |
111 | skb = alloc_skb(size, GFP_ATOMIC); | 110 | skb = alloc_skb(size, GFP_ATOMIC); |
112 | if (!skb) | 111 | if (!skb) |
113 | pr_debug("cannot even allocate " | 112 | pr_debug("cannot even allocate buffer of size %ub\n", |
114 | "buffer of size %ub\n", size); | 113 | size); |
115 | } | 114 | } |
116 | } | 115 | } |
117 | 116 | ||
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index 47fc8f3a47cf..f1fa1f6e658d 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/net.h> | 16 | #include <linux/net.h> |
17 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
18 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
19 | #include <linux/module.h> | ||
19 | #include <net/netns/generic.h> | 20 | #include <net/netns/generic.h> |
20 | #include <net/net_namespace.h> | 21 | #include <net/net_namespace.h> |
21 | #include <net/pkt_sched.h> | 22 | #include <net/pkt_sched.h> |
diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c index 75d4bfae1a78..df08c47183d4 100644 --- a/net/caif/cfpkt_skbuff.c +++ b/net/caif/cfpkt_skbuff.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/string.h> | 9 | #include <linux/string.h> |
10 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
11 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
12 | #include <linux/export.h> | ||
12 | #include <net/caif/cfpkt.h> | 13 | #include <net/caif/cfpkt.h> |
13 | 14 | ||
14 | #define PKT_PREFIX 48 | 15 | #define PKT_PREFIX 48 |
diff --git a/net/ceph/Kconfig b/net/ceph/Kconfig index be683f2d401f..cc04dd667a10 100644 --- a/net/ceph/Kconfig +++ b/net/ceph/Kconfig | |||
@@ -27,3 +27,17 @@ config CEPH_LIB_PRETTYDEBUG | |||
27 | 27 | ||
28 | If unsure, say N. | 28 | If unsure, say N. |
29 | 29 | ||
30 | config CEPH_LIB_USE_DNS_RESOLVER | ||
31 | bool "Use in-kernel support for DNS lookup" | ||
32 | depends on CEPH_LIB | ||
33 | select DNS_RESOLVER | ||
34 | default n | ||
35 | help | ||
36 | If you say Y here, hostnames (e.g. monitor addresses) will | ||
37 | be resolved using the CONFIG_DNS_RESOLVER facility. | ||
38 | |||
39 | For information on how to use CONFIG_DNS_RESOLVER consult | ||
40 | Documentation/networking/dns_resolver.txt | ||
41 | |||
42 | If unsure, say N. | ||
43 | |||
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index 2883ea01e680..97f70e50ad3b 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c | |||
@@ -432,9 +432,12 @@ EXPORT_SYMBOL(ceph_client_id); | |||
432 | /* | 432 | /* |
433 | * create a fresh client instance | 433 | * create a fresh client instance |
434 | */ | 434 | */ |
435 | struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private) | 435 | struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private, |
436 | unsigned supported_features, | ||
437 | unsigned required_features) | ||
436 | { | 438 | { |
437 | struct ceph_client *client; | 439 | struct ceph_client *client; |
440 | struct ceph_entity_addr *myaddr = NULL; | ||
438 | int err = -ENOMEM; | 441 | int err = -ENOMEM; |
439 | 442 | ||
440 | client = kzalloc(sizeof(*client), GFP_KERNEL); | 443 | client = kzalloc(sizeof(*client), GFP_KERNEL); |
@@ -449,15 +452,27 @@ struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private) | |||
449 | client->auth_err = 0; | 452 | client->auth_err = 0; |
450 | 453 | ||
451 | client->extra_mon_dispatch = NULL; | 454 | client->extra_mon_dispatch = NULL; |
452 | client->supported_features = CEPH_FEATURE_SUPPORTED_DEFAULT; | 455 | client->supported_features = CEPH_FEATURE_SUPPORTED_DEFAULT | |
453 | client->required_features = CEPH_FEATURE_REQUIRED_DEFAULT; | 456 | supported_features; |
454 | 457 | client->required_features = CEPH_FEATURE_REQUIRED_DEFAULT | | |
455 | client->msgr = NULL; | 458 | required_features; |
459 | |||
460 | /* msgr */ | ||
461 | if (ceph_test_opt(client, MYIP)) | ||
462 | myaddr = &client->options->my_addr; | ||
463 | client->msgr = ceph_messenger_create(myaddr, | ||
464 | client->supported_features, | ||
465 | client->required_features); | ||
466 | if (IS_ERR(client->msgr)) { | ||
467 | err = PTR_ERR(client->msgr); | ||
468 | goto fail; | ||
469 | } | ||
470 | client->msgr->nocrc = ceph_test_opt(client, NOCRC); | ||
456 | 471 | ||
457 | /* subsystems */ | 472 | /* subsystems */ |
458 | err = ceph_monc_init(&client->monc, client); | 473 | err = ceph_monc_init(&client->monc, client); |
459 | if (err < 0) | 474 | if (err < 0) |
460 | goto fail; | 475 | goto fail_msgr; |
461 | err = ceph_osdc_init(&client->osdc, client); | 476 | err = ceph_osdc_init(&client->osdc, client); |
462 | if (err < 0) | 477 | if (err < 0) |
463 | goto fail_monc; | 478 | goto fail_monc; |
@@ -466,6 +481,8 @@ struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private) | |||
466 | 481 | ||
467 | fail_monc: | 482 | fail_monc: |
468 | ceph_monc_stop(&client->monc); | 483 | ceph_monc_stop(&client->monc); |
484 | fail_msgr: | ||
485 | ceph_messenger_destroy(client->msgr); | ||
469 | fail: | 486 | fail: |
470 | kfree(client); | 487 | kfree(client); |
471 | return ERR_PTR(err); | 488 | return ERR_PTR(err); |
@@ -490,8 +507,7 @@ void ceph_destroy_client(struct ceph_client *client) | |||
490 | 507 | ||
491 | ceph_debugfs_client_cleanup(client); | 508 | ceph_debugfs_client_cleanup(client); |
492 | 509 | ||
493 | if (client->msgr) | 510 | ceph_messenger_destroy(client->msgr); |
494 | ceph_messenger_destroy(client->msgr); | ||
495 | 511 | ||
496 | ceph_destroy_options(client->options); | 512 | ceph_destroy_options(client->options); |
497 | 513 | ||
@@ -514,24 +530,9 @@ static int have_mon_and_osd_map(struct ceph_client *client) | |||
514 | */ | 530 | */ |
515 | int __ceph_open_session(struct ceph_client *client, unsigned long started) | 531 | int __ceph_open_session(struct ceph_client *client, unsigned long started) |
516 | { | 532 | { |
517 | struct ceph_entity_addr *myaddr = NULL; | ||
518 | int err; | 533 | int err; |
519 | unsigned long timeout = client->options->mount_timeout * HZ; | 534 | unsigned long timeout = client->options->mount_timeout * HZ; |
520 | 535 | ||
521 | /* initialize the messenger */ | ||
522 | if (client->msgr == NULL) { | ||
523 | if (ceph_test_opt(client, MYIP)) | ||
524 | myaddr = &client->options->my_addr; | ||
525 | client->msgr = ceph_messenger_create(myaddr, | ||
526 | client->supported_features, | ||
527 | client->required_features); | ||
528 | if (IS_ERR(client->msgr)) { | ||
529 | client->msgr = NULL; | ||
530 | return PTR_ERR(client->msgr); | ||
531 | } | ||
532 | client->msgr->nocrc = ceph_test_opt(client, NOCRC); | ||
533 | } | ||
534 | |||
535 | /* open session, and wait for mon and osd maps */ | 536 | /* open session, and wait for mon and osd maps */ |
536 | err = ceph_monc_open_session(&client->monc); | 537 | err = ceph_monc_open_session(&client->monc); |
537 | if (err < 0) | 538 | if (err < 0) |
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 9918e9eb276e..ad5b70801f37 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -11,12 +11,14 @@ | |||
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/bio.h> | 12 | #include <linux/bio.h> |
13 | #include <linux/blkdev.h> | 13 | #include <linux/blkdev.h> |
14 | #include <linux/dns_resolver.h> | ||
14 | #include <net/tcp.h> | 15 | #include <net/tcp.h> |
15 | 16 | ||
16 | #include <linux/ceph/libceph.h> | 17 | #include <linux/ceph/libceph.h> |
17 | #include <linux/ceph/messenger.h> | 18 | #include <linux/ceph/messenger.h> |
18 | #include <linux/ceph/decode.h> | 19 | #include <linux/ceph/decode.h> |
19 | #include <linux/ceph/pagelist.h> | 20 | #include <linux/ceph/pagelist.h> |
21 | #include <linux/export.h> | ||
20 | 22 | ||
21 | /* | 23 | /* |
22 | * Ceph uses the messenger to exchange ceph_msg messages with other | 24 | * Ceph uses the messenger to exchange ceph_msg messages with other |
@@ -1078,6 +1080,101 @@ static void addr_set_port(struct sockaddr_storage *ss, int p) | |||
1078 | } | 1080 | } |
1079 | 1081 | ||
1080 | /* | 1082 | /* |
1083 | * Unlike other *_pton function semantics, zero indicates success. | ||
1084 | */ | ||
1085 | static int ceph_pton(const char *str, size_t len, struct sockaddr_storage *ss, | ||
1086 | char delim, const char **ipend) | ||
1087 | { | ||
1088 | struct sockaddr_in *in4 = (void *)ss; | ||
1089 | struct sockaddr_in6 *in6 = (void *)ss; | ||
1090 | |||
1091 | memset(ss, 0, sizeof(*ss)); | ||
1092 | |||
1093 | if (in4_pton(str, len, (u8 *)&in4->sin_addr.s_addr, delim, ipend)) { | ||
1094 | ss->ss_family = AF_INET; | ||
1095 | return 0; | ||
1096 | } | ||
1097 | |||
1098 | if (in6_pton(str, len, (u8 *)&in6->sin6_addr.s6_addr, delim, ipend)) { | ||
1099 | ss->ss_family = AF_INET6; | ||
1100 | return 0; | ||
1101 | } | ||
1102 | |||
1103 | return -EINVAL; | ||
1104 | } | ||
1105 | |||
1106 | /* | ||
1107 | * Extract hostname string and resolve using kernel DNS facility. | ||
1108 | */ | ||
1109 | #ifdef CONFIG_CEPH_LIB_USE_DNS_RESOLVER | ||
1110 | static int ceph_dns_resolve_name(const char *name, size_t namelen, | ||
1111 | struct sockaddr_storage *ss, char delim, const char **ipend) | ||
1112 | { | ||
1113 | const char *end, *delim_p; | ||
1114 | char *colon_p, *ip_addr = NULL; | ||
1115 | int ip_len, ret; | ||
1116 | |||
1117 | /* | ||
1118 | * The end of the hostname occurs immediately preceding the delimiter or | ||
1119 | * the port marker (':') where the delimiter takes precedence. | ||
1120 | */ | ||
1121 | delim_p = memchr(name, delim, namelen); | ||
1122 | colon_p = memchr(name, ':', namelen); | ||
1123 | |||
1124 | if (delim_p && colon_p) | ||
1125 | end = delim_p < colon_p ? delim_p : colon_p; | ||
1126 | else if (!delim_p && colon_p) | ||
1127 | end = colon_p; | ||
1128 | else { | ||
1129 | end = delim_p; | ||
1130 | if (!end) /* case: hostname:/ */ | ||
1131 | end = name + namelen; | ||
1132 | } | ||
1133 | |||
1134 | if (end <= name) | ||
1135 | return -EINVAL; | ||
1136 | |||
1137 | /* do dns_resolve upcall */ | ||
1138 | ip_len = dns_query(NULL, name, end - name, NULL, &ip_addr, NULL); | ||
1139 | if (ip_len > 0) | ||
1140 | ret = ceph_pton(ip_addr, ip_len, ss, -1, NULL); | ||
1141 | else | ||
1142 | ret = -ESRCH; | ||
1143 | |||
1144 | kfree(ip_addr); | ||
1145 | |||
1146 | *ipend = end; | ||
1147 | |||
1148 | pr_info("resolve '%.*s' (ret=%d): %s\n", (int)(end - name), name, | ||
1149 | ret, ret ? "failed" : ceph_pr_addr(ss)); | ||
1150 | |||
1151 | return ret; | ||
1152 | } | ||
1153 | #else | ||
1154 | static inline int ceph_dns_resolve_name(const char *name, size_t namelen, | ||
1155 | struct sockaddr_storage *ss, char delim, const char **ipend) | ||
1156 | { | ||
1157 | return -EINVAL; | ||
1158 | } | ||
1159 | #endif | ||
1160 | |||
1161 | /* | ||
1162 | * Parse a server name (IP or hostname). If a valid IP address is not found | ||
1163 | * then try to extract a hostname to resolve using userspace DNS upcall. | ||
1164 | */ | ||
1165 | static int ceph_parse_server_name(const char *name, size_t namelen, | ||
1166 | struct sockaddr_storage *ss, char delim, const char **ipend) | ||
1167 | { | ||
1168 | int ret; | ||
1169 | |||
1170 | ret = ceph_pton(name, namelen, ss, delim, ipend); | ||
1171 | if (ret) | ||
1172 | ret = ceph_dns_resolve_name(name, namelen, ss, delim, ipend); | ||
1173 | |||
1174 | return ret; | ||
1175 | } | ||
1176 | |||
1177 | /* | ||
1081 | * Parse an ip[:port] list into an addr array. Use the default | 1178 | * Parse an ip[:port] list into an addr array. Use the default |
1082 | * monitor port if a port isn't specified. | 1179 | * monitor port if a port isn't specified. |
1083 | */ | 1180 | */ |
@@ -1085,15 +1182,13 @@ int ceph_parse_ips(const char *c, const char *end, | |||
1085 | struct ceph_entity_addr *addr, | 1182 | struct ceph_entity_addr *addr, |
1086 | int max_count, int *count) | 1183 | int max_count, int *count) |
1087 | { | 1184 | { |
1088 | int i; | 1185 | int i, ret = -EINVAL; |
1089 | const char *p = c; | 1186 | const char *p = c; |
1090 | 1187 | ||
1091 | dout("parse_ips on '%.*s'\n", (int)(end-c), c); | 1188 | dout("parse_ips on '%.*s'\n", (int)(end-c), c); |
1092 | for (i = 0; i < max_count; i++) { | 1189 | for (i = 0; i < max_count; i++) { |
1093 | const char *ipend; | 1190 | const char *ipend; |
1094 | struct sockaddr_storage *ss = &addr[i].in_addr; | 1191 | struct sockaddr_storage *ss = &addr[i].in_addr; |
1095 | struct sockaddr_in *in4 = (void *)ss; | ||
1096 | struct sockaddr_in6 *in6 = (void *)ss; | ||
1097 | int port; | 1192 | int port; |
1098 | char delim = ','; | 1193 | char delim = ','; |
1099 | 1194 | ||
@@ -1102,15 +1197,11 @@ int ceph_parse_ips(const char *c, const char *end, | |||
1102 | p++; | 1197 | p++; |
1103 | } | 1198 | } |
1104 | 1199 | ||
1105 | memset(ss, 0, sizeof(*ss)); | 1200 | ret = ceph_parse_server_name(p, end - p, ss, delim, &ipend); |
1106 | if (in4_pton(p, end - p, (u8 *)&in4->sin_addr.s_addr, | 1201 | if (ret) |
1107 | delim, &ipend)) | ||
1108 | ss->ss_family = AF_INET; | ||
1109 | else if (in6_pton(p, end - p, (u8 *)&in6->sin6_addr.s6_addr, | ||
1110 | delim, &ipend)) | ||
1111 | ss->ss_family = AF_INET6; | ||
1112 | else | ||
1113 | goto bad; | 1202 | goto bad; |
1203 | ret = -EINVAL; | ||
1204 | |||
1114 | p = ipend; | 1205 | p = ipend; |
1115 | 1206 | ||
1116 | if (delim == ']') { | 1207 | if (delim == ']') { |
@@ -1155,7 +1246,7 @@ int ceph_parse_ips(const char *c, const char *end, | |||
1155 | 1246 | ||
1156 | bad: | 1247 | bad: |
1157 | pr_err("parse_ips bad ip '%.*s'\n", (int)(end - c), c); | 1248 | pr_err("parse_ips bad ip '%.*s'\n", (int)(end - c), c); |
1158 | return -EINVAL; | 1249 | return ret; |
1159 | } | 1250 | } |
1160 | EXPORT_SYMBOL(ceph_parse_ips); | 1251 | EXPORT_SYMBOL(ceph_parse_ips); |
1161 | 1252 | ||
@@ -2281,7 +2372,8 @@ EXPORT_SYMBOL(ceph_con_keepalive); | |||
2281 | * construct a new message with given type, size | 2372 | * construct a new message with given type, size |
2282 | * the new msg has a ref count of 1. | 2373 | * the new msg has a ref count of 1. |
2283 | */ | 2374 | */ |
2284 | struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags) | 2375 | struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags, |
2376 | bool can_fail) | ||
2285 | { | 2377 | { |
2286 | struct ceph_msg *m; | 2378 | struct ceph_msg *m; |
2287 | 2379 | ||
@@ -2333,7 +2425,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags) | |||
2333 | m->front.iov_base = kmalloc(front_len, flags); | 2425 | m->front.iov_base = kmalloc(front_len, flags); |
2334 | } | 2426 | } |
2335 | if (m->front.iov_base == NULL) { | 2427 | if (m->front.iov_base == NULL) { |
2336 | pr_err("msg_new can't allocate %d bytes\n", | 2428 | dout("ceph_msg_new can't allocate %d bytes\n", |
2337 | front_len); | 2429 | front_len); |
2338 | goto out2; | 2430 | goto out2; |
2339 | } | 2431 | } |
@@ -2348,7 +2440,14 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags) | |||
2348 | out2: | 2440 | out2: |
2349 | ceph_msg_put(m); | 2441 | ceph_msg_put(m); |
2350 | out: | 2442 | out: |
2351 | pr_err("msg_new can't create type %d front %d\n", type, front_len); | 2443 | if (!can_fail) { |
2444 | pr_err("msg_new can't create type %d front %d\n", type, | ||
2445 | front_len); | ||
2446 | WARN_ON(1); | ||
2447 | } else { | ||
2448 | dout("msg_new can't create type %d front %d\n", type, | ||
2449 | front_len); | ||
2450 | } | ||
2352 | return NULL; | 2451 | return NULL; |
2353 | } | 2452 | } |
2354 | EXPORT_SYMBOL(ceph_msg_new); | 2453 | EXPORT_SYMBOL(ceph_msg_new); |
@@ -2398,7 +2497,7 @@ static struct ceph_msg *ceph_alloc_msg(struct ceph_connection *con, | |||
2398 | } | 2497 | } |
2399 | if (!msg) { | 2498 | if (!msg) { |
2400 | *skip = 0; | 2499 | *skip = 0; |
2401 | msg = ceph_msg_new(type, front_len, GFP_NOFS); | 2500 | msg = ceph_msg_new(type, front_len, GFP_NOFS, false); |
2402 | if (!msg) { | 2501 | if (!msg) { |
2403 | pr_err("unable to allocate msg type %d len %d\n", | 2502 | pr_err("unable to allocate msg type %d len %d\n", |
2404 | type, front_len); | 2503 | type, front_len); |
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index cbe31fa45508..0b62deae42bd 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c | |||
@@ -116,14 +116,12 @@ static void __send_prepared_auth_request(struct ceph_mon_client *monc, int len) | |||
116 | */ | 116 | */ |
117 | static void __close_session(struct ceph_mon_client *monc) | 117 | static void __close_session(struct ceph_mon_client *monc) |
118 | { | 118 | { |
119 | if (monc->con) { | 119 | dout("__close_session closing mon%d\n", monc->cur_mon); |
120 | dout("__close_session closing mon%d\n", monc->cur_mon); | 120 | ceph_con_revoke(monc->con, monc->m_auth); |
121 | ceph_con_revoke(monc->con, monc->m_auth); | 121 | ceph_con_close(monc->con); |
122 | ceph_con_close(monc->con); | 122 | monc->cur_mon = -1; |
123 | monc->cur_mon = -1; | 123 | monc->pending_auth = 0; |
124 | monc->pending_auth = 0; | 124 | ceph_auth_reset(monc->auth); |
125 | ceph_auth_reset(monc->auth); | ||
126 | } | ||
127 | } | 125 | } |
128 | 126 | ||
129 | /* | 127 | /* |
@@ -302,15 +300,6 @@ void ceph_monc_request_next_osdmap(struct ceph_mon_client *monc) | |||
302 | */ | 300 | */ |
303 | int ceph_monc_open_session(struct ceph_mon_client *monc) | 301 | int ceph_monc_open_session(struct ceph_mon_client *monc) |
304 | { | 302 | { |
305 | if (!monc->con) { | ||
306 | monc->con = kmalloc(sizeof(*monc->con), GFP_KERNEL); | ||
307 | if (!monc->con) | ||
308 | return -ENOMEM; | ||
309 | ceph_con_init(monc->client->msgr, monc->con); | ||
310 | monc->con->private = monc; | ||
311 | monc->con->ops = &mon_con_ops; | ||
312 | } | ||
313 | |||
314 | mutex_lock(&monc->mutex); | 303 | mutex_lock(&monc->mutex); |
315 | __open_session(monc); | 304 | __open_session(monc); |
316 | __schedule_delayed(monc); | 305 | __schedule_delayed(monc); |
@@ -528,10 +517,12 @@ int ceph_monc_do_statfs(struct ceph_mon_client *monc, struct ceph_statfs *buf) | |||
528 | init_completion(&req->completion); | 517 | init_completion(&req->completion); |
529 | 518 | ||
530 | err = -ENOMEM; | 519 | err = -ENOMEM; |
531 | req->request = ceph_msg_new(CEPH_MSG_STATFS, sizeof(*h), GFP_NOFS); | 520 | req->request = ceph_msg_new(CEPH_MSG_STATFS, sizeof(*h), GFP_NOFS, |
521 | true); | ||
532 | if (!req->request) | 522 | if (!req->request) |
533 | goto out; | 523 | goto out; |
534 | req->reply = ceph_msg_new(CEPH_MSG_STATFS_REPLY, 1024, GFP_NOFS); | 524 | req->reply = ceph_msg_new(CEPH_MSG_STATFS_REPLY, 1024, GFP_NOFS, |
525 | true); | ||
535 | if (!req->reply) | 526 | if (!req->reply) |
536 | goto out; | 527 | goto out; |
537 | 528 | ||
@@ -626,10 +617,12 @@ int ceph_monc_do_poolop(struct ceph_mon_client *monc, u32 op, | |||
626 | init_completion(&req->completion); | 617 | init_completion(&req->completion); |
627 | 618 | ||
628 | err = -ENOMEM; | 619 | err = -ENOMEM; |
629 | req->request = ceph_msg_new(CEPH_MSG_POOLOP, sizeof(*h), GFP_NOFS); | 620 | req->request = ceph_msg_new(CEPH_MSG_POOLOP, sizeof(*h), GFP_NOFS, |
621 | true); | ||
630 | if (!req->request) | 622 | if (!req->request) |
631 | goto out; | 623 | goto out; |
632 | req->reply = ceph_msg_new(CEPH_MSG_POOLOP_REPLY, 1024, GFP_NOFS); | 624 | req->reply = ceph_msg_new(CEPH_MSG_POOLOP_REPLY, 1024, GFP_NOFS, |
625 | true); | ||
633 | if (!req->reply) | 626 | if (!req->reply) |
634 | goto out; | 627 | goto out; |
635 | 628 | ||
@@ -755,13 +748,21 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) | |||
755 | if (err) | 748 | if (err) |
756 | goto out; | 749 | goto out; |
757 | 750 | ||
758 | monc->con = NULL; | 751 | /* connection */ |
752 | monc->con = kmalloc(sizeof(*monc->con), GFP_KERNEL); | ||
753 | if (!monc->con) | ||
754 | goto out_monmap; | ||
755 | ceph_con_init(monc->client->msgr, monc->con); | ||
756 | monc->con->private = monc; | ||
757 | monc->con->ops = &mon_con_ops; | ||
759 | 758 | ||
760 | /* authentication */ | 759 | /* authentication */ |
761 | monc->auth = ceph_auth_init(cl->options->name, | 760 | monc->auth = ceph_auth_init(cl->options->name, |
762 | cl->options->key); | 761 | cl->options->key); |
763 | if (IS_ERR(monc->auth)) | 762 | if (IS_ERR(monc->auth)) { |
764 | return PTR_ERR(monc->auth); | 763 | err = PTR_ERR(monc->auth); |
764 | goto out_con; | ||
765 | } | ||
765 | monc->auth->want_keys = | 766 | monc->auth->want_keys = |
766 | CEPH_ENTITY_TYPE_AUTH | CEPH_ENTITY_TYPE_MON | | 767 | CEPH_ENTITY_TYPE_AUTH | CEPH_ENTITY_TYPE_MON | |
767 | CEPH_ENTITY_TYPE_OSD | CEPH_ENTITY_TYPE_MDS; | 768 | CEPH_ENTITY_TYPE_OSD | CEPH_ENTITY_TYPE_MDS; |
@@ -770,19 +771,21 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) | |||
770 | err = -ENOMEM; | 771 | err = -ENOMEM; |
771 | monc->m_subscribe_ack = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE_ACK, | 772 | monc->m_subscribe_ack = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE_ACK, |
772 | sizeof(struct ceph_mon_subscribe_ack), | 773 | sizeof(struct ceph_mon_subscribe_ack), |
773 | GFP_NOFS); | 774 | GFP_NOFS, true); |
774 | if (!monc->m_subscribe_ack) | 775 | if (!monc->m_subscribe_ack) |
775 | goto out_monmap; | 776 | goto out_auth; |
776 | 777 | ||
777 | monc->m_subscribe = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE, 96, GFP_NOFS); | 778 | monc->m_subscribe = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE, 96, GFP_NOFS, |
779 | true); | ||
778 | if (!monc->m_subscribe) | 780 | if (!monc->m_subscribe) |
779 | goto out_subscribe_ack; | 781 | goto out_subscribe_ack; |
780 | 782 | ||
781 | monc->m_auth_reply = ceph_msg_new(CEPH_MSG_AUTH_REPLY, 4096, GFP_NOFS); | 783 | monc->m_auth_reply = ceph_msg_new(CEPH_MSG_AUTH_REPLY, 4096, GFP_NOFS, |
784 | true); | ||
782 | if (!monc->m_auth_reply) | 785 | if (!monc->m_auth_reply) |
783 | goto out_subscribe; | 786 | goto out_subscribe; |
784 | 787 | ||
785 | monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096, GFP_NOFS); | 788 | monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096, GFP_NOFS, true); |
786 | monc->pending_auth = 0; | 789 | monc->pending_auth = 0; |
787 | if (!monc->m_auth) | 790 | if (!monc->m_auth) |
788 | goto out_auth_reply; | 791 | goto out_auth_reply; |
@@ -808,6 +811,10 @@ out_subscribe: | |||
808 | ceph_msg_put(monc->m_subscribe); | 811 | ceph_msg_put(monc->m_subscribe); |
809 | out_subscribe_ack: | 812 | out_subscribe_ack: |
810 | ceph_msg_put(monc->m_subscribe_ack); | 813 | ceph_msg_put(monc->m_subscribe_ack); |
814 | out_auth: | ||
815 | ceph_auth_destroy(monc->auth); | ||
816 | out_con: | ||
817 | monc->con->ops->put(monc->con); | ||
811 | out_monmap: | 818 | out_monmap: |
812 | kfree(monc->monmap); | 819 | kfree(monc->monmap); |
813 | out: | 820 | out: |
@@ -822,11 +829,11 @@ void ceph_monc_stop(struct ceph_mon_client *monc) | |||
822 | 829 | ||
823 | mutex_lock(&monc->mutex); | 830 | mutex_lock(&monc->mutex); |
824 | __close_session(monc); | 831 | __close_session(monc); |
825 | if (monc->con) { | 832 | |
826 | monc->con->private = NULL; | 833 | monc->con->private = NULL; |
827 | monc->con->ops->put(monc->con); | 834 | monc->con->ops->put(monc->con); |
828 | monc->con = NULL; | 835 | monc->con = NULL; |
829 | } | 836 | |
830 | mutex_unlock(&monc->mutex); | 837 | mutex_unlock(&monc->mutex); |
831 | 838 | ||
832 | ceph_auth_destroy(monc->auth); | 839 | ceph_auth_destroy(monc->auth); |
@@ -973,7 +980,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con, | |||
973 | case CEPH_MSG_MON_MAP: | 980 | case CEPH_MSG_MON_MAP: |
974 | case CEPH_MSG_MDS_MAP: | 981 | case CEPH_MSG_MDS_MAP: |
975 | case CEPH_MSG_OSD_MAP: | 982 | case CEPH_MSG_OSD_MAP: |
976 | m = ceph_msg_new(type, front_len, GFP_NOFS); | 983 | m = ceph_msg_new(type, front_len, GFP_NOFS, false); |
977 | break; | 984 | break; |
978 | } | 985 | } |
979 | 986 | ||
@@ -1000,7 +1007,7 @@ static void mon_fault(struct ceph_connection *con) | |||
1000 | if (!con->private) | 1007 | if (!con->private) |
1001 | goto out; | 1008 | goto out; |
1002 | 1009 | ||
1003 | if (monc->con && !monc->hunting) | 1010 | if (!monc->hunting) |
1004 | pr_info("mon%d %s session lost, " | 1011 | pr_info("mon%d %s session lost, " |
1005 | "hunting for new mon\n", monc->cur_mon, | 1012 | "hunting for new mon\n", monc->cur_mon, |
1006 | ceph_pr_addr(&monc->con->peer_addr.in_addr)); | 1013 | ceph_pr_addr(&monc->con->peer_addr.in_addr)); |
diff --git a/net/ceph/msgpool.c b/net/ceph/msgpool.c index 1f4cb30a42c5..11d5f4196a73 100644 --- a/net/ceph/msgpool.c +++ b/net/ceph/msgpool.c | |||
@@ -12,7 +12,7 @@ static void *msgpool_alloc(gfp_t gfp_mask, void *arg) | |||
12 | struct ceph_msgpool *pool = arg; | 12 | struct ceph_msgpool *pool = arg; |
13 | struct ceph_msg *msg; | 13 | struct ceph_msg *msg; |
14 | 14 | ||
15 | msg = ceph_msg_new(0, pool->front_len, gfp_mask); | 15 | msg = ceph_msg_new(0, pool->front_len, gfp_mask, true); |
16 | if (!msg) { | 16 | if (!msg) { |
17 | dout("msgpool_alloc %s failed\n", pool->name); | 17 | dout("msgpool_alloc %s failed\n", pool->name); |
18 | } else { | 18 | } else { |
@@ -61,7 +61,7 @@ struct ceph_msg *ceph_msgpool_get(struct ceph_msgpool *pool, | |||
61 | WARN_ON(1); | 61 | WARN_ON(1); |
62 | 62 | ||
63 | /* try to alloc a fresh message */ | 63 | /* try to alloc a fresh message */ |
64 | return ceph_msg_new(0, front_len, GFP_NOFS); | 64 | return ceph_msg_new(0, front_len, GFP_NOFS, false); |
65 | } | 65 | } |
66 | 66 | ||
67 | msg = mempool_alloc(pool->pool, GFP_NOFS); | 67 | msg = mempool_alloc(pool->pool, GFP_NOFS); |
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 88ad8a2501b5..733e46008b89 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -227,7 +227,7 @@ struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc, | |||
227 | msg = ceph_msgpool_get(&osdc->msgpool_op_reply, 0); | 227 | msg = ceph_msgpool_get(&osdc->msgpool_op_reply, 0); |
228 | else | 228 | else |
229 | msg = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, | 229 | msg = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, |
230 | OSD_OPREPLY_FRONT_LEN, gfp_flags); | 230 | OSD_OPREPLY_FRONT_LEN, gfp_flags, true); |
231 | if (!msg) { | 231 | if (!msg) { |
232 | ceph_osdc_put_request(req); | 232 | ceph_osdc_put_request(req); |
233 | return NULL; | 233 | return NULL; |
@@ -250,7 +250,7 @@ struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc, | |||
250 | if (use_mempool) | 250 | if (use_mempool) |
251 | msg = ceph_msgpool_get(&osdc->msgpool_op, 0); | 251 | msg = ceph_msgpool_get(&osdc->msgpool_op, 0); |
252 | else | 252 | else |
253 | msg = ceph_msg_new(CEPH_MSG_OSD_OP, msg_size, gfp_flags); | 253 | msg = ceph_msg_new(CEPH_MSG_OSD_OP, msg_size, gfp_flags, true); |
254 | if (!msg) { | 254 | if (!msg) { |
255 | ceph_osdc_put_request(req); | 255 | ceph_osdc_put_request(req); |
256 | return NULL; | 256 | return NULL; |
@@ -943,7 +943,7 @@ EXPORT_SYMBOL(ceph_osdc_set_request_linger); | |||
943 | * Caller should hold map_sem for read and request_mutex. | 943 | * Caller should hold map_sem for read and request_mutex. |
944 | */ | 944 | */ |
945 | static int __map_request(struct ceph_osd_client *osdc, | 945 | static int __map_request(struct ceph_osd_client *osdc, |
946 | struct ceph_osd_request *req) | 946 | struct ceph_osd_request *req, int force_resend) |
947 | { | 947 | { |
948 | struct ceph_osd_request_head *reqhead = req->r_request->front.iov_base; | 948 | struct ceph_osd_request_head *reqhead = req->r_request->front.iov_base; |
949 | struct ceph_pg pgid; | 949 | struct ceph_pg pgid; |
@@ -967,7 +967,8 @@ static int __map_request(struct ceph_osd_client *osdc, | |||
967 | num = err; | 967 | num = err; |
968 | } | 968 | } |
969 | 969 | ||
970 | if ((req->r_osd && req->r_osd->o_osd == o && | 970 | if ((!force_resend && |
971 | req->r_osd && req->r_osd->o_osd == o && | ||
971 | req->r_sent >= req->r_osd->o_incarnation && | 972 | req->r_sent >= req->r_osd->o_incarnation && |
972 | req->r_num_pg_osds == num && | 973 | req->r_num_pg_osds == num && |
973 | memcmp(req->r_pg_osds, acting, sizeof(acting[0])*num) == 0) || | 974 | memcmp(req->r_pg_osds, acting, sizeof(acting[0])*num) == 0) || |
@@ -1289,18 +1290,18 @@ static void reset_changed_osds(struct ceph_osd_client *osdc) | |||
1289 | * | 1290 | * |
1290 | * Caller should hold map_sem for read and request_mutex. | 1291 | * Caller should hold map_sem for read and request_mutex. |
1291 | */ | 1292 | */ |
1292 | static void kick_requests(struct ceph_osd_client *osdc) | 1293 | static void kick_requests(struct ceph_osd_client *osdc, int force_resend) |
1293 | { | 1294 | { |
1294 | struct ceph_osd_request *req, *nreq; | 1295 | struct ceph_osd_request *req, *nreq; |
1295 | struct rb_node *p; | 1296 | struct rb_node *p; |
1296 | int needmap = 0; | 1297 | int needmap = 0; |
1297 | int err; | 1298 | int err; |
1298 | 1299 | ||
1299 | dout("kick_requests\n"); | 1300 | dout("kick_requests %s\n", force_resend ? " (force resend)" : ""); |
1300 | mutex_lock(&osdc->request_mutex); | 1301 | mutex_lock(&osdc->request_mutex); |
1301 | for (p = rb_first(&osdc->requests); p; p = rb_next(p)) { | 1302 | for (p = rb_first(&osdc->requests); p; p = rb_next(p)) { |
1302 | req = rb_entry(p, struct ceph_osd_request, r_node); | 1303 | req = rb_entry(p, struct ceph_osd_request, r_node); |
1303 | err = __map_request(osdc, req); | 1304 | err = __map_request(osdc, req, force_resend); |
1304 | if (err < 0) | 1305 | if (err < 0) |
1305 | continue; /* error */ | 1306 | continue; /* error */ |
1306 | if (req->r_osd == NULL) { | 1307 | if (req->r_osd == NULL) { |
@@ -1318,7 +1319,7 @@ static void kick_requests(struct ceph_osd_client *osdc) | |||
1318 | r_linger_item) { | 1319 | r_linger_item) { |
1319 | dout("linger req=%p req->r_osd=%p\n", req, req->r_osd); | 1320 | dout("linger req=%p req->r_osd=%p\n", req, req->r_osd); |
1320 | 1321 | ||
1321 | err = __map_request(osdc, req); | 1322 | err = __map_request(osdc, req, force_resend); |
1322 | if (err == 0) | 1323 | if (err == 0) |
1323 | continue; /* no change and no osd was specified */ | 1324 | continue; /* no change and no osd was specified */ |
1324 | if (err < 0) | 1325 | if (err < 0) |
@@ -1395,7 +1396,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) | |||
1395 | ceph_osdmap_destroy(osdc->osdmap); | 1396 | ceph_osdmap_destroy(osdc->osdmap); |
1396 | osdc->osdmap = newmap; | 1397 | osdc->osdmap = newmap; |
1397 | } | 1398 | } |
1398 | kick_requests(osdc); | 1399 | kick_requests(osdc, 0); |
1399 | reset_changed_osds(osdc); | 1400 | reset_changed_osds(osdc); |
1400 | } else { | 1401 | } else { |
1401 | dout("ignoring incremental map %u len %d\n", | 1402 | dout("ignoring incremental map %u len %d\n", |
@@ -1423,6 +1424,8 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) | |||
1423 | "older than our %u\n", epoch, maplen, | 1424 | "older than our %u\n", epoch, maplen, |
1424 | osdc->osdmap->epoch); | 1425 | osdc->osdmap->epoch); |
1425 | } else { | 1426 | } else { |
1427 | int skipped_map = 0; | ||
1428 | |||
1426 | dout("taking full map %u len %d\n", epoch, maplen); | 1429 | dout("taking full map %u len %d\n", epoch, maplen); |
1427 | newmap = osdmap_decode(&p, p+maplen); | 1430 | newmap = osdmap_decode(&p, p+maplen); |
1428 | if (IS_ERR(newmap)) { | 1431 | if (IS_ERR(newmap)) { |
@@ -1432,9 +1435,12 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) | |||
1432 | BUG_ON(!newmap); | 1435 | BUG_ON(!newmap); |
1433 | oldmap = osdc->osdmap; | 1436 | oldmap = osdc->osdmap; |
1434 | osdc->osdmap = newmap; | 1437 | osdc->osdmap = newmap; |
1435 | if (oldmap) | 1438 | if (oldmap) { |
1439 | if (oldmap->epoch + 1 < newmap->epoch) | ||
1440 | skipped_map = 1; | ||
1436 | ceph_osdmap_destroy(oldmap); | 1441 | ceph_osdmap_destroy(oldmap); |
1437 | kick_requests(osdc); | 1442 | } |
1443 | kick_requests(osdc, skipped_map); | ||
1438 | } | 1444 | } |
1439 | p += maplen; | 1445 | p += maplen; |
1440 | nr_maps--; | 1446 | nr_maps--; |
@@ -1707,7 +1713,7 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc, | |||
1707 | * the request still han't been touched yet. | 1713 | * the request still han't been touched yet. |
1708 | */ | 1714 | */ |
1709 | if (req->r_sent == 0) { | 1715 | if (req->r_sent == 0) { |
1710 | rc = __map_request(osdc, req); | 1716 | rc = __map_request(osdc, req, 0); |
1711 | if (rc < 0) { | 1717 | if (rc < 0) { |
1712 | if (nofail) { | 1718 | if (nofail) { |
1713 | dout("osdc_start_request failed map, " | 1719 | dout("osdc_start_request failed map, " |
@@ -2032,7 +2038,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, | |||
2032 | if (front > req->r_reply->front.iov_len) { | 2038 | if (front > req->r_reply->front.iov_len) { |
2033 | pr_warning("get_reply front %d > preallocated %d\n", | 2039 | pr_warning("get_reply front %d > preallocated %d\n", |
2034 | front, (int)req->r_reply->front.iov_len); | 2040 | front, (int)req->r_reply->front.iov_len); |
2035 | m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front, GFP_NOFS); | 2041 | m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front, GFP_NOFS, false); |
2036 | if (!m) | 2042 | if (!m) |
2037 | goto out; | 2043 | goto out; |
2038 | ceph_msg_put(req->r_reply); | 2044 | ceph_msg_put(req->r_reply); |
@@ -2080,7 +2086,7 @@ static struct ceph_msg *alloc_msg(struct ceph_connection *con, | |||
2080 | switch (type) { | 2086 | switch (type) { |
2081 | case CEPH_MSG_OSD_MAP: | 2087 | case CEPH_MSG_OSD_MAP: |
2082 | case CEPH_MSG_WATCH_NOTIFY: | 2088 | case CEPH_MSG_WATCH_NOTIFY: |
2083 | return ceph_msg_new(type, front, GFP_NOFS); | 2089 | return ceph_msg_new(type, front, GFP_NOFS, false); |
2084 | case CEPH_MSG_OSD_OPREPLY: | 2090 | case CEPH_MSG_OSD_OPREPLY: |
2085 | return get_reply(con, hdr, skip); | 2091 | return get_reply(con, hdr, skip); |
2086 | default: | 2092 | default: |
diff --git a/net/compat.c b/net/compat.c index c578d9382e19..6def90e0a112 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/filter.h> | 22 | #include <linux/filter.h> |
23 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
24 | #include <linux/security.h> | 24 | #include <linux/security.h> |
25 | #include <linux/export.h> | ||
25 | 26 | ||
26 | #include <net/scm.h> | 27 | #include <net/scm.h> |
27 | #include <net/sock.h> | 28 | #include <net/sock.h> |
diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c index 283d1b863876..277faef9148d 100644 --- a/net/core/dev_addr_lists.c +++ b/net/core/dev_addr_lists.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/rtnetlink.h> | 15 | #include <linux/rtnetlink.h> |
16 | #include <linux/export.h> | ||
16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
17 | #include <linux/proc_fs.h> | 18 | #include <linux/proc_fs.h> |
18 | 19 | ||
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 57e8f95110e6..c02e63c908da 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/module.h> | ||
15 | #include <net/net_namespace.h> | 16 | #include <net/net_namespace.h> |
16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
17 | #include <net/fib_rules.h> | 18 | #include <net/fib_rules.h> |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 909ecb3c2a33..039d51e6c284 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -872,12 +872,8 @@ static void neigh_timer_handler(unsigned long arg) | |||
872 | now = jiffies; | 872 | now = jiffies; |
873 | next = now + HZ; | 873 | next = now + HZ; |
874 | 874 | ||
875 | if (!(state & NUD_IN_TIMER)) { | 875 | if (!(state & NUD_IN_TIMER)) |
876 | #ifndef CONFIG_SMP | ||
877 | printk(KERN_WARNING "neigh: timer & !nud_in_timer\n"); | ||
878 | #endif | ||
879 | goto out; | 876 | goto out; |
880 | } | ||
881 | 877 | ||
882 | if (state & NUD_REACHABLE) { | 878 | if (state & NUD_REACHABLE) { |
883 | if (time_before_eq(now, | 879 | if (time_before_eq(now, |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 7604a635376b..c71c434a4c05 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/wireless.h> | 21 | #include <linux/wireless.h> |
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/export.h> | ||
23 | #include <net/wext.h> | 24 | #include <net/wext.h> |
24 | 25 | ||
25 | #include "net-sysfs.h" | 26 | #include "net-sysfs.h" |
diff --git a/net/core/net-traces.c b/net/core/net-traces.c index 52380b1d552a..ba3c0120786c 100644 --- a/net/core/net-traces.c +++ b/net/core/net-traces.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/inetdevice.h> | 11 | #include <linux/inetdevice.h> |
12 | #include <linux/inet.h> | 12 | #include <linux/inet.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/export.h> | ||
14 | #include <linux/netpoll.h> | 15 | #include <linux/netpoll.h> |
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 5bbdbf0d3664..aefcd7acbffa 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/nsproxy.h> | 10 | #include <linux/nsproxy.h> |
11 | #include <linux/proc_fs.h> | 11 | #include <linux/proc_fs.h> |
12 | #include <linux/file.h> | 12 | #include <linux/file.h> |
13 | #include <linux/export.h> | ||
13 | #include <net/net_namespace.h> | 14 | #include <net/net_namespace.h> |
14 | #include <net/netns/generic.h> | 15 | #include <net/netns/generic.h> |
15 | 16 | ||
diff --git a/net/core/netevent.c b/net/core/netevent.c index 865f0ceb81fb..f17ccd291d39 100644 --- a/net/core/netevent.c +++ b/net/core/netevent.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/rtnetlink.h> | 16 | #include <linux/rtnetlink.h> |
17 | #include <linux/notifier.h> | 17 | #include <linux/notifier.h> |
18 | #include <linux/export.h> | ||
18 | #include <net/netevent.h> | 19 | #include <net/netevent.h> |
19 | 20 | ||
20 | static ATOMIC_NOTIFIER_HEAD(netevent_notif_chain); | 21 | static ATOMIC_NOTIFIER_HEAD(netevent_notif_chain); |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index f57d94627a2a..cf64c1ffa4cd 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/export.h> | ||
26 | #include <net/tcp.h> | 27 | #include <net/tcp.h> |
27 | #include <net/udp.h> | 28 | #include <net/udp.h> |
28 | #include <asm/unaligned.h> | 29 | #include <asm/unaligned.h> |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 2f6babd5a570..06438f926022 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -189,6 +189,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, | |||
189 | * aligned memory blocks, unless SLUB/SLAB debug is enabled. | 189 | * aligned memory blocks, unless SLUB/SLAB debug is enabled. |
190 | * Both skb->head and skb_shared_info are cache line aligned. | 190 | * Both skb->head and skb_shared_info are cache line aligned. |
191 | */ | 191 | */ |
192 | size = SKB_DATA_ALIGN(size); | ||
192 | size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); | 193 | size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); |
193 | data = kmalloc_node_track_caller(size, gfp_mask, node); | 194 | data = kmalloc_node_track_caller(size, gfp_mask, node); |
194 | if (!data) | 195 | if (!data) |
diff --git a/net/core/timestamping.c b/net/core/timestamping.c index 82fb28857b64..661b5a40ec10 100644 --- a/net/core/timestamping.c +++ b/net/core/timestamping.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/phy.h> | 21 | #include <linux/phy.h> |
22 | #include <linux/ptp_classify.h> | 22 | #include <linux/ptp_classify.h> |
23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
24 | #include <linux/export.h> | ||
24 | 25 | ||
25 | static struct sock_filter ptp_filter[] = { | 26 | static struct sock_filter ptp_filter[] = { |
26 | PTP_FILTER | 27 | PTP_FILTER |
diff --git a/net/core/user_dma.c b/net/core/user_dma.c index 2d7cf3d52b4c..1b5fefdb8198 100644 --- a/net/core/user_dma.c +++ b/net/core/user_dma.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/dmaengine.h> | 28 | #include <linux/dmaengine.h> |
29 | #include <linux/socket.h> | 29 | #include <linux/socket.h> |
30 | #include <linux/export.h> | ||
30 | #include <net/tcp.h> | 31 | #include <net/tcp.h> |
31 | #include <net/netdma.h> | 32 | #include <net/netdma.h> |
32 | 33 | ||
diff --git a/net/dcb/dcbevent.c b/net/dcb/dcbevent.c index 665a8802105a..1d9eb7c60a68 100644 --- a/net/dcb/dcbevent.c +++ b/net/dcb/dcbevent.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/notifier.h> | 21 | #include <linux/notifier.h> |
22 | #include <linux/export.h> | ||
22 | 23 | ||
23 | static ATOMIC_NOTIFIER_HEAD(dcbevent_notif_chain); | 24 | static ATOMIC_NOTIFIER_HEAD(dcbevent_notif_chain); |
24 | 25 | ||
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index 9bfbc1d1b50c..d86053002c16 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/dcbnl.h> | 25 | #include <linux/dcbnl.h> |
26 | #include <net/dcbevent.h> | 26 | #include <net/dcbevent.h> |
27 | #include <linux/rtnetlink.h> | 27 | #include <linux/rtnetlink.h> |
28 | #include <linux/module.h> | ||
28 | #include <net/sock.h> | 29 | #include <net/sock.h> |
29 | 30 | ||
30 | /** | 31 | /** |
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c index 25b7a8d1ad58..ba07824af4c0 100644 --- a/net/dccp/ackvec.c +++ b/net/dccp/ackvec.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "dccp.h" | 12 | #include "dccp.h" |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/export.h> | ||
15 | 16 | ||
16 | static struct kmem_cache *dccp_ackvec_slab; | 17 | static struct kmem_cache *dccp_ackvec_slab; |
17 | static struct kmem_cache *dccp_ackvec_record_slab; | 18 | static struct kmem_cache *dccp_ackvec_record_slab; |
diff --git a/net/dccp/ccids/lib/tfrc.c b/net/dccp/ccids/lib/tfrc.c index 4902029854d8..1f94b7e01d39 100644 --- a/net/dccp/ccids/lib/tfrc.c +++ b/net/dccp/ccids/lib/tfrc.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright (c) 2007 The University of Aberdeen, Scotland, UK | 4 | * Copyright (c) 2007 The University of Aberdeen, Scotland, UK |
5 | * Copyright (c) 2007 Arnaldo Carvalho de Melo <acme@redhat.com> | 5 | * Copyright (c) 2007 Arnaldo Carvalho de Melo <acme@redhat.com> |
6 | */ | 6 | */ |
7 | #include <linux/moduleparam.h> | ||
7 | #include "tfrc.h" | 8 | #include "tfrc.h" |
8 | 9 | ||
9 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG | 10 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 332639b56f4d..90a919afbed7 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -433,6 +433,7 @@ exit: | |||
433 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); | 433 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); |
434 | return NULL; | 434 | return NULL; |
435 | put_and_exit: | 435 | put_and_exit: |
436 | bh_unlock_sock(newsk); | ||
436 | sock_put(newsk); | 437 | sock_put(newsk); |
437 | goto exit; | 438 | goto exit; |
438 | } | 439 | } |
diff --git a/net/dccp/timer.c b/net/dccp/timer.c index 7587870b7040..16f0b223102e 100644 --- a/net/dccp/timer.c +++ b/net/dccp/timer.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/dccp.h> | 13 | #include <linux/dccp.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/export.h> | ||
15 | 16 | ||
16 | #include "dccp.h" | 17 | #include "dccp.h" |
17 | 18 | ||
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 43450c100226..a77d16158eb6 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -77,6 +77,7 @@ | |||
77 | #include <linux/netfilter_decnet.h> | 77 | #include <linux/netfilter_decnet.h> |
78 | #include <linux/rcupdate.h> | 78 | #include <linux/rcupdate.h> |
79 | #include <linux/times.h> | 79 | #include <linux/times.h> |
80 | #include <linux/export.h> | ||
80 | #include <asm/errno.h> | 81 | #include <asm/errno.h> |
81 | #include <net/net_namespace.h> | 82 | #include <net/net_namespace.h> |
82 | #include <net/netlink.h> | 83 | #include <net/netlink.h> |
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index f0efb0ccfeca..f65c9ddaee41 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/rcupdate.h> | 25 | #include <linux/rcupdate.h> |
26 | #include <linux/export.h> | ||
26 | #include <net/neighbour.h> | 27 | #include <net/neighbour.h> |
27 | #include <net/dst.h> | 28 | #include <net/dst.h> |
28 | #include <net/flow.h> | 29 | #include <net/flow.h> |
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 3fb14b7c13cf..0dc1589343c3 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/module.h> | ||
15 | #include <net/dsa.h> | 16 | #include <net/dsa.h> |
16 | #include "dsa_priv.h" | 17 | #include "dsa_priv.h" |
17 | 18 | ||
diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c index 71ee1108d4f8..adaf46214905 100644 --- a/net/ieee802154/nl-mac.c +++ b/net/ieee802154/nl-mac.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <net/genetlink.h> | 30 | #include <net/genetlink.h> |
31 | #include <net/sock.h> | 31 | #include <net/sock.h> |
32 | #include <linux/nl802154.h> | 32 | #include <linux/nl802154.h> |
33 | #include <linux/export.h> | ||
33 | #include <net/af_ieee802154.h> | 34 | #include <net/af_ieee802154.h> |
34 | #include <net/nl802154.h> | 35 | #include <net/nl802154.h> |
35 | #include <net/ieee802154.h> | 36 | #include <net/ieee802154.h> |
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index a53bb1b5b118..46339ba7a2d3 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/rcupdate.h> | 28 | #include <linux/rcupdate.h> |
29 | #include <linux/export.h> | ||
29 | #include <net/ip.h> | 30 | #include <net/ip.h> |
30 | #include <net/route.h> | 31 | #include <net/route.h> |
31 | #include <net/tcp.h> | 32 | #include <net/tcp.h> |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 89d6f71a6a99..37b671185c81 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -73,6 +73,7 @@ | |||
73 | #include <linux/list.h> | 73 | #include <linux/list.h> |
74 | #include <linux/slab.h> | 74 | #include <linux/slab.h> |
75 | #include <linux/prefetch.h> | 75 | #include <linux/prefetch.h> |
76 | #include <linux/export.h> | ||
76 | #include <net/net_namespace.h> | 77 | #include <net/net_namespace.h> |
77 | #include <net/ip.h> | 78 | #include <net/ip.h> |
78 | #include <net/protocol.h> | 79 | #include <net/protocol.h> |
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 44d65d546e30..89168c6351ff 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/kmemcheck.h> | 12 | #include <linux/kmemcheck.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/module.h> | ||
14 | #include <net/inet_hashtables.h> | 15 | #include <net/inet_hashtables.h> |
15 | #include <net/inet_timewait_sock.h> | 16 | #include <net/inet_timewait_sock.h> |
16 | #include <net/ip.h> | 17 | #include <net/ip.h> |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 472a8c4f1dc0..0da2afc97f32 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/delay.h> | 54 | #include <linux/delay.h> |
55 | #include <linux/nfs_fs.h> | 55 | #include <linux/nfs_fs.h> |
56 | #include <linux/slab.h> | 56 | #include <linux/slab.h> |
57 | #include <linux/export.h> | ||
57 | #include <net/net_namespace.h> | 58 | #include <net/net_namespace.h> |
58 | #include <net/arp.h> | 59 | #include <net/arp.h> |
59 | #include <net/ip.h> | 60 | #include <net/ip.h> |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 6164e982e0ef..76a7f07b38b6 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/if_arp.h> | 61 | #include <linux/if_arp.h> |
62 | #include <linux/netfilter_ipv4.h> | 62 | #include <linux/netfilter_ipv4.h> |
63 | #include <linux/compat.h> | 63 | #include <linux/compat.h> |
64 | #include <linux/export.h> | ||
64 | #include <net/ipip.h> | 65 | #include <net/ipip.h> |
65 | #include <net/checksum.h> | 66 | #include <net/checksum.h> |
66 | #include <net/netlink.h> | 67 | #include <net/netlink.h> |
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c index 929b27bdeb79..9899619ab9b8 100644 --- a/net/ipv4/netfilter.c +++ b/net/ipv4/netfilter.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/ip.h> | 5 | #include <linux/ip.h> |
6 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
7 | #include <linux/gfp.h> | 7 | #include <linux/gfp.h> |
8 | #include <linux/export.h> | ||
8 | #include <net/route.h> | 9 | #include <net/route.h> |
9 | #include <net/xfrm.h> | 10 | #include <net/xfrm.h> |
10 | #include <net/ip.h> | 11 | #include <net/ip.h> |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index db8d22db425f..a639967eb727 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -395,7 +395,6 @@ static int clusterip_tg_check(const struct xt_tgchk_param *par) | |||
395 | config = clusterip_config_init(cipinfo, | 395 | config = clusterip_config_init(cipinfo, |
396 | e->ip.dst.s_addr, dev); | 396 | e->ip.dst.s_addr, dev); |
397 | if (!config) { | 397 | if (!config) { |
398 | pr_info("cannot allocate config\n"); | ||
399 | dev_put(dev); | 398 | dev_put(dev); |
400 | return -ENOMEM; | 399 | return -ENOMEM; |
401 | } | 400 | } |
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index 446e0f467a17..b5508151e547 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -135,10 +135,8 @@ static struct sk_buff *ulog_alloc_skb(unsigned int size) | |||
135 | * due to slab allocator restrictions */ | 135 | * due to slab allocator restrictions */ |
136 | 136 | ||
137 | n = max(size, nlbufsiz); | 137 | n = max(size, nlbufsiz); |
138 | skb = alloc_skb(n, GFP_ATOMIC); | 138 | skb = alloc_skb(n, GFP_ATOMIC | __GFP_NOWARN); |
139 | if (!skb) { | 139 | if (!skb) { |
140 | pr_debug("cannot alloc whole buffer %ub!\n", n); | ||
141 | |||
142 | if (n > size) { | 140 | if (n > size) { |
143 | /* try to allocate only as much as we need for | 141 | /* try to allocate only as much as we need for |
144 | * current packet */ | 142 | * current packet */ |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c index 5585980fce2e..9682b36df38c 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <net/netfilter/nf_conntrack_expect.h> | 21 | #include <net/netfilter/nf_conntrack_expect.h> |
22 | #include <net/netfilter/nf_conntrack_acct.h> | 22 | #include <net/netfilter/nf_conntrack_acct.h> |
23 | #include <linux/rculist_nulls.h> | 23 | #include <linux/rculist_nulls.h> |
24 | #include <linux/export.h> | ||
24 | 25 | ||
25 | struct ct_iter_state { | 26 | struct ct_iter_state { |
26 | struct seq_net_private p; | 27 | struct seq_net_private p; |
diff --git a/net/ipv4/netfilter/nf_nat_proto_common.c b/net/ipv4/netfilter/nf_nat_proto_common.c index f52d41ea0690..a3d997618602 100644 --- a/net/ipv4/netfilter/nf_nat_proto_common.c +++ b/net/ipv4/netfilter/nf_nat_proto_common.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/ip.h> | 12 | #include <linux/ip.h> |
13 | 13 | ||
14 | #include <linux/netfilter.h> | 14 | #include <linux/netfilter.h> |
15 | #include <linux/export.h> | ||
15 | #include <net/secure_seq.h> | 16 | #include <net/secure_seq.h> |
16 | #include <net/netfilter/nf_nat.h> | 17 | #include <net/netfilter/nf_nat.h> |
17 | #include <net/netfilter/nf_nat_core.h> | 18 | #include <net/netfilter/nf_nat_core.h> |
diff --git a/net/ipv4/netfilter/nf_nat_proto_icmp.c b/net/ipv4/netfilter/nf_nat_proto_icmp.c index 5744c3ec847c..9f4dc1235dc7 100644 --- a/net/ipv4/netfilter/nf_nat_proto_icmp.c +++ b/net/ipv4/netfilter/nf_nat_proto_icmp.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/ip.h> | 12 | #include <linux/ip.h> |
12 | #include <linux/icmp.h> | 13 | #include <linux/icmp.h> |
13 | 14 | ||
diff --git a/net/ipv4/netfilter/nf_nat_proto_sctp.c b/net/ipv4/netfilter/nf_nat_proto_sctp.c index 756331d42661..bd5a80a62a5b 100644 --- a/net/ipv4/netfilter/nf_nat_proto_sctp.c +++ b/net/ipv4/netfilter/nf_nat_proto_sctp.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/ip.h> | 11 | #include <linux/ip.h> |
12 | #include <linux/sctp.h> | 12 | #include <linux/sctp.h> |
13 | #include <linux/module.h> | ||
13 | #include <net/sctp/checksum.h> | 14 | #include <net/sctp/checksum.h> |
14 | 15 | ||
15 | #include <net/netfilter/nf_nat_protocol.h> | 16 | #include <net/netfilter/nf_nat_protocol.h> |
diff --git a/net/ipv4/netfilter/nf_nat_proto_tcp.c b/net/ipv4/netfilter/nf_nat_proto_tcp.c index aa460a595d5d..0d67bb80130f 100644 --- a/net/ipv4/netfilter/nf_nat_proto_tcp.c +++ b/net/ipv4/netfilter/nf_nat_proto_tcp.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/ip.h> | 12 | #include <linux/ip.h> |
12 | #include <linux/tcp.h> | 13 | #include <linux/tcp.h> |
13 | 14 | ||
diff --git a/net/ipv4/netfilter/nf_nat_proto_udp.c b/net/ipv4/netfilter/nf_nat_proto_udp.c index dfe65c7e2925..0b1b8601cba7 100644 --- a/net/ipv4/netfilter/nf_nat_proto_udp.c +++ b/net/ipv4/netfilter/nf_nat_proto_udp.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/init.h> | 11 | #include <linux/init.h> |
11 | #include <linux/ip.h> | 12 | #include <linux/ip.h> |
12 | #include <linux/udp.h> | 13 | #include <linux/udp.h> |
diff --git a/net/ipv4/netfilter/nf_nat_proto_udplite.c b/net/ipv4/netfilter/nf_nat_proto_udplite.c index 3cc8c8af39ef..f83ef23e2ab7 100644 --- a/net/ipv4/netfilter/nf_nat_proto_udplite.c +++ b/net/ipv4/netfilter/nf_nat_proto_udplite.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/udp.h> | 13 | #include <linux/udp.h> |
14 | 14 | ||
15 | #include <linux/netfilter.h> | 15 | #include <linux/netfilter.h> |
16 | #include <linux/module.h> | ||
16 | #include <net/netfilter/nf_nat.h> | 17 | #include <net/netfilter/nf_nat.h> |
17 | #include <net/netfilter/nf_nat_protocol.h> | 18 | #include <net/netfilter/nf_nat_protocol.h> |
18 | 19 | ||
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index d1cb412c18e0..2133c30a4a5f 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c | |||
@@ -400,11 +400,8 @@ static unsigned char asn1_octets_decode(struct asn1_ctx *ctx, | |||
400 | *len = 0; | 400 | *len = 0; |
401 | 401 | ||
402 | *octets = kmalloc(eoc - ctx->pointer, GFP_ATOMIC); | 402 | *octets = kmalloc(eoc - ctx->pointer, GFP_ATOMIC); |
403 | if (*octets == NULL) { | 403 | if (*octets == NULL) |
404 | if (net_ratelimit()) | ||
405 | pr_notice("OOM in bsalg (%d)\n", __LINE__); | ||
406 | return 0; | 404 | return 0; |
407 | } | ||
408 | 405 | ||
409 | ptr = *octets; | 406 | ptr = *octets; |
410 | while (ctx->pointer < eoc) { | 407 | while (ctx->pointer < eoc) { |
@@ -451,11 +448,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx, | |||
451 | return 0; | 448 | return 0; |
452 | 449 | ||
453 | *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); | 450 | *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); |
454 | if (*oid == NULL) { | 451 | if (*oid == NULL) |
455 | if (net_ratelimit()) | ||
456 | pr_notice("OOM in bsalg (%d)\n", __LINE__); | ||
457 | return 0; | 452 | return 0; |
458 | } | ||
459 | 453 | ||
460 | optr = *oid; | 454 | optr = *oid; |
461 | 455 | ||
@@ -728,8 +722,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
728 | *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); | 722 | *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); |
729 | if (*obj == NULL) { | 723 | if (*obj == NULL) { |
730 | kfree(id); | 724 | kfree(id); |
731 | if (net_ratelimit()) | ||
732 | pr_notice("OOM in bsalg (%d)\n", __LINE__); | ||
733 | return 0; | 725 | return 0; |
734 | } | 726 | } |
735 | (*obj)->syntax.l[0] = l; | 727 | (*obj)->syntax.l[0] = l; |
@@ -744,8 +736,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
744 | if (*obj == NULL) { | 736 | if (*obj == NULL) { |
745 | kfree(p); | 737 | kfree(p); |
746 | kfree(id); | 738 | kfree(id); |
747 | if (net_ratelimit()) | ||
748 | pr_notice("OOM in bsalg (%d)\n", __LINE__); | ||
749 | return 0; | 739 | return 0; |
750 | } | 740 | } |
751 | memcpy((*obj)->syntax.c, p, len); | 741 | memcpy((*obj)->syntax.c, p, len); |
@@ -759,8 +749,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
759 | *obj = kmalloc(sizeof(struct snmp_object), GFP_ATOMIC); | 749 | *obj = kmalloc(sizeof(struct snmp_object), GFP_ATOMIC); |
760 | if (*obj == NULL) { | 750 | if (*obj == NULL) { |
761 | kfree(id); | 751 | kfree(id); |
762 | if (net_ratelimit()) | ||
763 | pr_notice("OOM in bsalg (%d)\n", __LINE__); | ||
764 | return 0; | 752 | return 0; |
765 | } | 753 | } |
766 | if (!asn1_null_decode(ctx, end)) { | 754 | if (!asn1_null_decode(ctx, end)) { |
@@ -780,8 +768,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
780 | if (*obj == NULL) { | 768 | if (*obj == NULL) { |
781 | kfree(lp); | 769 | kfree(lp); |
782 | kfree(id); | 770 | kfree(id); |
783 | if (net_ratelimit()) | ||
784 | pr_notice("OOM in bsalg (%d)\n", __LINE__); | ||
785 | return 0; | 771 | return 0; |
786 | } | 772 | } |
787 | memcpy((*obj)->syntax.ul, lp, len); | 773 | memcpy((*obj)->syntax.ul, lp, len); |
@@ -801,8 +787,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
801 | if (*obj == NULL) { | 787 | if (*obj == NULL) { |
802 | kfree(p); | 788 | kfree(p); |
803 | kfree(id); | 789 | kfree(id); |
804 | if (net_ratelimit()) | ||
805 | pr_notice("OOM in bsalg (%d)\n", __LINE__); | ||
806 | return 0; | 790 | return 0; |
807 | } | 791 | } |
808 | memcpy((*obj)->syntax.uc, p, len); | 792 | memcpy((*obj)->syntax.uc, p, len); |
@@ -819,8 +803,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
819 | *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); | 803 | *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); |
820 | if (*obj == NULL) { | 804 | if (*obj == NULL) { |
821 | kfree(id); | 805 | kfree(id); |
822 | if (net_ratelimit()) | ||
823 | pr_notice("OOM in bsalg (%d)\n", __LINE__); | ||
824 | return 0; | 806 | return 0; |
825 | } | 807 | } |
826 | (*obj)->syntax.ul[0] = ul; | 808 | (*obj)->syntax.ul[0] = ul; |
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 39b403f854c6..a06f73fdb3c0 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <net/protocol.h> | 39 | #include <net/protocol.h> |
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <linux/proc_fs.h> | 41 | #include <linux/proc_fs.h> |
42 | #include <linux/export.h> | ||
42 | #include <net/sock.h> | 43 | #include <net/sock.h> |
43 | #include <net/ping.h> | 44 | #include <net/ping.h> |
44 | #include <net/udp.h> | 45 | #include <net/udp.h> |
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 4bfad5da94f4..466ea8bb7a4d 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/inetdevice.h> | 42 | #include <linux/inetdevice.h> |
43 | #include <linux/proc_fs.h> | 43 | #include <linux/proc_fs.h> |
44 | #include <linux/seq_file.h> | 44 | #include <linux/seq_file.h> |
45 | #include <linux/export.h> | ||
45 | #include <net/sock.h> | 46 | #include <net/sock.h> |
46 | #include <net/raw.h> | 47 | #include <net/raw.h> |
47 | 48 | ||
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 61714bd52925..007e2eb769d3 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/errno.h> | 48 | #include <linux/errno.h> |
49 | #include <linux/aio.h> | 49 | #include <linux/aio.h> |
50 | #include <linux/kernel.h> | 50 | #include <linux/kernel.h> |
51 | #include <linux/export.h> | ||
51 | #include <linux/spinlock.h> | 52 | #include <linux/spinlock.h> |
52 | #include <linux/sockios.h> | 53 | #include <linux/sockios.h> |
53 | #include <linux/socket.h> | 54 | #include <linux/socket.h> |
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index d7b89b12f6d8..90f6544c13e2 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/random.h> | 15 | #include <linux/random.h> |
16 | #include <linux/cryptohash.h> | 16 | #include <linux/cryptohash.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/export.h> | ||
18 | #include <net/tcp.h> | 19 | #include <net/tcp.h> |
19 | #include <net/route.h> | 20 | #include <net/route.h> |
20 | 21 | ||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 0ea10eefa60f..a7443159c400 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1510,6 +1510,7 @@ exit: | |||
1510 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); | 1510 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); |
1511 | return NULL; | 1511 | return NULL; |
1512 | put_and_exit: | 1512 | put_and_exit: |
1513 | bh_unlock_sock(newsk); | ||
1513 | sock_put(newsk); | 1514 | sock_put(newsk); |
1514 | goto exit; | 1515 | goto exit; |
1515 | } | 1516 | } |
@@ -2339,7 +2340,7 @@ static void tcp_seq_stop(struct seq_file *seq, void *v) | |||
2339 | } | 2340 | } |
2340 | } | 2341 | } |
2341 | 2342 | ||
2342 | static int tcp_seq_open(struct inode *inode, struct file *file) | 2343 | int tcp_seq_open(struct inode *inode, struct file *file) |
2343 | { | 2344 | { |
2344 | struct tcp_seq_afinfo *afinfo = PDE(inode)->data; | 2345 | struct tcp_seq_afinfo *afinfo = PDE(inode)->data; |
2345 | struct tcp_iter_state *s; | 2346 | struct tcp_iter_state *s; |
@@ -2355,23 +2356,19 @@ static int tcp_seq_open(struct inode *inode, struct file *file) | |||
2355 | s->last_pos = 0; | 2356 | s->last_pos = 0; |
2356 | return 0; | 2357 | return 0; |
2357 | } | 2358 | } |
2359 | EXPORT_SYMBOL(tcp_seq_open); | ||
2358 | 2360 | ||
2359 | int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo) | 2361 | int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo) |
2360 | { | 2362 | { |
2361 | int rc = 0; | 2363 | int rc = 0; |
2362 | struct proc_dir_entry *p; | 2364 | struct proc_dir_entry *p; |
2363 | 2365 | ||
2364 | afinfo->seq_fops.open = tcp_seq_open; | ||
2365 | afinfo->seq_fops.read = seq_read; | ||
2366 | afinfo->seq_fops.llseek = seq_lseek; | ||
2367 | afinfo->seq_fops.release = seq_release_net; | ||
2368 | |||
2369 | afinfo->seq_ops.start = tcp_seq_start; | 2366 | afinfo->seq_ops.start = tcp_seq_start; |
2370 | afinfo->seq_ops.next = tcp_seq_next; | 2367 | afinfo->seq_ops.next = tcp_seq_next; |
2371 | afinfo->seq_ops.stop = tcp_seq_stop; | 2368 | afinfo->seq_ops.stop = tcp_seq_stop; |
2372 | 2369 | ||
2373 | p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net, | 2370 | p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net, |
2374 | &afinfo->seq_fops, afinfo); | 2371 | afinfo->seq_fops, afinfo); |
2375 | if (!p) | 2372 | if (!p) |
2376 | rc = -ENOMEM; | 2373 | rc = -ENOMEM; |
2377 | return rc; | 2374 | return rc; |
@@ -2520,12 +2517,18 @@ out: | |||
2520 | return 0; | 2517 | return 0; |
2521 | } | 2518 | } |
2522 | 2519 | ||
2520 | static const struct file_operations tcp_afinfo_seq_fops = { | ||
2521 | .owner = THIS_MODULE, | ||
2522 | .open = tcp_seq_open, | ||
2523 | .read = seq_read, | ||
2524 | .llseek = seq_lseek, | ||
2525 | .release = seq_release_net | ||
2526 | }; | ||
2527 | |||
2523 | static struct tcp_seq_afinfo tcp4_seq_afinfo = { | 2528 | static struct tcp_seq_afinfo tcp4_seq_afinfo = { |
2524 | .name = "tcp", | 2529 | .name = "tcp", |
2525 | .family = AF_INET, | 2530 | .family = AF_INET, |
2526 | .seq_fops = { | 2531 | .seq_fops = &tcp_afinfo_seq_fops, |
2527 | .owner = THIS_MODULE, | ||
2528 | }, | ||
2529 | .seq_ops = { | 2532 | .seq_ops = { |
2530 | .show = tcp4_seq_show, | 2533 | .show = tcp4_seq_show, |
2531 | }, | 2534 | }, |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index ebaa96bd3464..ab0966df1e2a 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1397,6 +1397,8 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
1397 | nf_reset(skb); | 1397 | nf_reset(skb); |
1398 | 1398 | ||
1399 | if (up->encap_type) { | 1399 | if (up->encap_type) { |
1400 | int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); | ||
1401 | |||
1400 | /* | 1402 | /* |
1401 | * This is an encapsulation socket so pass the skb to | 1403 | * This is an encapsulation socket so pass the skb to |
1402 | * the socket's udp_encap_rcv() hook. Otherwise, just | 1404 | * the socket's udp_encap_rcv() hook. Otherwise, just |
@@ -1409,11 +1411,11 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
1409 | */ | 1411 | */ |
1410 | 1412 | ||
1411 | /* if we're overly short, let UDP handle it */ | 1413 | /* if we're overly short, let UDP handle it */ |
1412 | if (skb->len > sizeof(struct udphdr) && | 1414 | encap_rcv = ACCESS_ONCE(up->encap_rcv); |
1413 | up->encap_rcv != NULL) { | 1415 | if (skb->len > sizeof(struct udphdr) && encap_rcv != NULL) { |
1414 | int ret; | 1416 | int ret; |
1415 | 1417 | ||
1416 | ret = (*up->encap_rcv)(sk, skb); | 1418 | ret = encap_rcv(sk, skb); |
1417 | if (ret <= 0) { | 1419 | if (ret <= 0) { |
1418 | UDP_INC_STATS_BH(sock_net(sk), | 1420 | UDP_INC_STATS_BH(sock_net(sk), |
1419 | UDP_MIB_INDATAGRAMS, | 1421 | UDP_MIB_INDATAGRAMS, |
@@ -2037,7 +2039,7 @@ static void udp_seq_stop(struct seq_file *seq, void *v) | |||
2037 | spin_unlock_bh(&state->udp_table->hash[state->bucket].lock); | 2039 | spin_unlock_bh(&state->udp_table->hash[state->bucket].lock); |
2038 | } | 2040 | } |
2039 | 2041 | ||
2040 | static int udp_seq_open(struct inode *inode, struct file *file) | 2042 | int udp_seq_open(struct inode *inode, struct file *file) |
2041 | { | 2043 | { |
2042 | struct udp_seq_afinfo *afinfo = PDE(inode)->data; | 2044 | struct udp_seq_afinfo *afinfo = PDE(inode)->data; |
2043 | struct udp_iter_state *s; | 2045 | struct udp_iter_state *s; |
@@ -2053,6 +2055,7 @@ static int udp_seq_open(struct inode *inode, struct file *file) | |||
2053 | s->udp_table = afinfo->udp_table; | 2055 | s->udp_table = afinfo->udp_table; |
2054 | return err; | 2056 | return err; |
2055 | } | 2057 | } |
2058 | EXPORT_SYMBOL(udp_seq_open); | ||
2056 | 2059 | ||
2057 | /* ------------------------------------------------------------------------ */ | 2060 | /* ------------------------------------------------------------------------ */ |
2058 | int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo) | 2061 | int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo) |
@@ -2060,17 +2063,12 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo) | |||
2060 | struct proc_dir_entry *p; | 2063 | struct proc_dir_entry *p; |
2061 | int rc = 0; | 2064 | int rc = 0; |
2062 | 2065 | ||
2063 | afinfo->seq_fops.open = udp_seq_open; | ||
2064 | afinfo->seq_fops.read = seq_read; | ||
2065 | afinfo->seq_fops.llseek = seq_lseek; | ||
2066 | afinfo->seq_fops.release = seq_release_net; | ||
2067 | |||
2068 | afinfo->seq_ops.start = udp_seq_start; | 2066 | afinfo->seq_ops.start = udp_seq_start; |
2069 | afinfo->seq_ops.next = udp_seq_next; | 2067 | afinfo->seq_ops.next = udp_seq_next; |
2070 | afinfo->seq_ops.stop = udp_seq_stop; | 2068 | afinfo->seq_ops.stop = udp_seq_stop; |
2071 | 2069 | ||
2072 | p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net, | 2070 | p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net, |
2073 | &afinfo->seq_fops, afinfo); | 2071 | afinfo->seq_fops, afinfo); |
2074 | if (!p) | 2072 | if (!p) |
2075 | rc = -ENOMEM; | 2073 | rc = -ENOMEM; |
2076 | return rc; | 2074 | return rc; |
@@ -2120,14 +2118,20 @@ int udp4_seq_show(struct seq_file *seq, void *v) | |||
2120 | return 0; | 2118 | return 0; |
2121 | } | 2119 | } |
2122 | 2120 | ||
2121 | static const struct file_operations udp_afinfo_seq_fops = { | ||
2122 | .owner = THIS_MODULE, | ||
2123 | .open = udp_seq_open, | ||
2124 | .read = seq_read, | ||
2125 | .llseek = seq_lseek, | ||
2126 | .release = seq_release_net | ||
2127 | }; | ||
2128 | |||
2123 | /* ------------------------------------------------------------------------ */ | 2129 | /* ------------------------------------------------------------------------ */ |
2124 | static struct udp_seq_afinfo udp4_seq_afinfo = { | 2130 | static struct udp_seq_afinfo udp4_seq_afinfo = { |
2125 | .name = "udp", | 2131 | .name = "udp", |
2126 | .family = AF_INET, | 2132 | .family = AF_INET, |
2127 | .udp_table = &udp_table, | 2133 | .udp_table = &udp_table, |
2128 | .seq_fops = { | 2134 | .seq_fops = &udp_afinfo_seq_fops, |
2129 | .owner = THIS_MODULE, | ||
2130 | }, | ||
2131 | .seq_ops = { | 2135 | .seq_ops = { |
2132 | .show = udp4_seq_show, | 2136 | .show = udp4_seq_show, |
2133 | }, | 2137 | }, |
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c index aee9963f7f5a..12e9499a1a6c 100644 --- a/net/ipv4/udplite.c +++ b/net/ipv4/udplite.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * as published by the Free Software Foundation; either version | 10 | * as published by the Free Software Foundation; either version |
11 | * 2 of the License, or (at your option) any later version. | 11 | * 2 of the License, or (at your option) any later version. |
12 | */ | 12 | */ |
13 | #include <linux/export.h> | ||
13 | #include "udp_impl.h" | 14 | #include "udp_impl.h" |
14 | 15 | ||
15 | struct udp_table udplite_table __read_mostly; | 16 | struct udp_table udplite_table __read_mostly; |
@@ -71,13 +72,20 @@ static struct inet_protosw udplite4_protosw = { | |||
71 | }; | 72 | }; |
72 | 73 | ||
73 | #ifdef CONFIG_PROC_FS | 74 | #ifdef CONFIG_PROC_FS |
75 | |||
76 | static const struct file_operations udplite_afinfo_seq_fops = { | ||
77 | .owner = THIS_MODULE, | ||
78 | .open = udp_seq_open, | ||
79 | .read = seq_read, | ||
80 | .llseek = seq_lseek, | ||
81 | .release = seq_release_net | ||
82 | }; | ||
83 | |||
74 | static struct udp_seq_afinfo udplite4_seq_afinfo = { | 84 | static struct udp_seq_afinfo udplite4_seq_afinfo = { |
75 | .name = "udplite", | 85 | .name = "udplite", |
76 | .family = AF_INET, | 86 | .family = AF_INET, |
77 | .udp_table = &udplite_table, | 87 | .udp_table = &udplite_table, |
78 | .seq_fops = { | 88 | .seq_fops = &udplite_afinfo_seq_fops, |
79 | .owner = THIS_MODULE, | ||
80 | }, | ||
81 | .seq_ops = { | 89 | .seq_ops = { |
82 | .show = udp4_seq_show, | 90 | .show = udp4_seq_show, |
83 | }, | 91 | }, |
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c index d9ac0a0058b5..9258e751baba 100644 --- a/net/ipv4/xfrm4_state.c +++ b/net/ipv4/xfrm4_state.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/pfkeyv2.h> | 12 | #include <linux/pfkeyv2.h> |
13 | #include <linux/ipsec.h> | 13 | #include <linux/ipsec.h> |
14 | #include <linux/netfilter_ipv4.h> | 14 | #include <linux/netfilter_ipv4.h> |
15 | #include <linux/export.h> | ||
15 | 16 | ||
16 | static int xfrm4_init_flags(struct xfrm_state *x) | 17 | static int xfrm4_init_flags(struct xfrm_state *x) |
17 | { | 18 | { |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index d0611a5de45f..cf88df82e2c2 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -87,6 +87,7 @@ | |||
87 | 87 | ||
88 | #include <linux/proc_fs.h> | 88 | #include <linux/proc_fs.h> |
89 | #include <linux/seq_file.h> | 89 | #include <linux/seq_file.h> |
90 | #include <linux/export.h> | ||
90 | 91 | ||
91 | /* Set to 3 to get tracing... */ | 92 | /* Set to 3 to get tracing... */ |
92 | #define ACONF_DEBUG 2 | 93 | #define ACONF_DEBUG 2 |
diff --git a/net/ipv6/addrconf_core.c b/net/ipv6/addrconf_core.c index 6b03826552e1..399287e595d7 100644 --- a/net/ipv6/addrconf_core.c +++ b/net/ipv6/addrconf_core.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * not configured or static. | 3 | * not configured or static. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/export.h> | ||
6 | #include <net/ipv6.h> | 7 | #include <net/ipv6.h> |
7 | 8 | ||
8 | #define IPV6_ADDR_SCOPE_TYPE(scope) ((scope) << 16) | 9 | #define IPV6_ADDR_SCOPE_TYPE(scope) ((scope) << 16) |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 1318de4c3e8d..bf22a225f422 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/in6.h> | 30 | #include <linux/in6.h> |
31 | #include <linux/icmpv6.h> | 31 | #include <linux/icmpv6.h> |
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/export.h> | ||
33 | 34 | ||
34 | #include <net/dst.h> | 35 | #include <net/dst.h> |
35 | #include <net/sock.h> | 36 | #include <net/sock.h> |
diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c index 14ed0a955b56..37f548b7f6dc 100644 --- a/net/ipv6/exthdrs_core.c +++ b/net/ipv6/exthdrs_core.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * IPv6 library code, needed by static components when full IPv6 support is | 2 | * IPv6 library code, needed by static components when full IPv6 support is |
3 | * not configured or static. | 3 | * not configured or static. |
4 | */ | 4 | */ |
5 | #include <linux/export.h> | ||
5 | #include <net/ipv6.h> | 6 | #include <net/ipv6.h> |
6 | 7 | ||
7 | /* | 8 | /* |
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 34d244df907d..295571576f83 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include <linux/export.h> | ||
17 | 18 | ||
18 | #include <net/fib_rules.h> | 19 | #include <net/fib_rules.h> |
19 | #include <net/ipv6.h> | 20 | #include <net/ipv6.h> |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 543039450193..4566dbd916d3 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/export.h> | ||
24 | 25 | ||
25 | #include <net/net_namespace.h> | 26 | #include <net/net_namespace.h> |
26 | #include <net/sock.h> | 27 | #include <net/sock.h> |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index def0538e2413..449a9185b8f2 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/pim.h> | 51 | #include <linux/pim.h> |
52 | #include <net/addrconf.h> | 52 | #include <net/addrconf.h> |
53 | #include <linux/netfilter_ipv6.h> | 53 | #include <linux/netfilter_ipv6.h> |
54 | #include <linux/export.h> | ||
54 | #include <net/ip6_checksum.h> | 55 | #include <net/ip6_checksum.h> |
55 | 56 | ||
56 | struct mr6_table { | 57 | struct mr6_table { |
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index 30fcee465448..db31561cc8df 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/ipv6.h> | 3 | #include <linux/ipv6.h> |
4 | #include <linux/netfilter.h> | 4 | #include <linux/netfilter.h> |
5 | #include <linux/netfilter_ipv6.h> | 5 | #include <linux/netfilter_ipv6.h> |
6 | #include <linux/export.h> | ||
6 | #include <net/dst.h> | 7 | #include <net/dst.h> |
7 | #include <net/ipv6.h> | 8 | #include <net/ipv6.h> |
8 | #include <net/ip6_route.h> | 9 | #include <net/ip6_route.h> |
@@ -100,9 +101,16 @@ static int nf_ip6_route(struct net *net, struct dst_entry **dst, | |||
100 | .pinet6 = (struct ipv6_pinfo *) &fake_pinfo, | 101 | .pinet6 = (struct ipv6_pinfo *) &fake_pinfo, |
101 | }; | 102 | }; |
102 | const void *sk = strict ? &fake_sk : NULL; | 103 | const void *sk = strict ? &fake_sk : NULL; |
103 | 104 | struct dst_entry *result; | |
104 | *dst = ip6_route_output(net, sk, &fl->u.ip6); | 105 | int err; |
105 | return (*dst)->error; | 106 | |
107 | result = ip6_route_output(net, sk, &fl->u.ip6); | ||
108 | err = result->error; | ||
109 | if (err) | ||
110 | dst_release(result); | ||
111 | else | ||
112 | *dst = result; | ||
113 | return err; | ||
106 | } | 114 | } |
107 | 115 | ||
108 | __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | 116 | __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index e8762c73b170..38f00b0298d3 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -182,7 +182,6 @@ fq_find(__be32 id, u32 user, struct in6_addr *src, struct in6_addr *dst) | |||
182 | return container_of(q, struct nf_ct_frag6_queue, q); | 182 | return container_of(q, struct nf_ct_frag6_queue, q); |
183 | 183 | ||
184 | oom: | 184 | oom: |
185 | pr_debug("Can't alloc new queue\n"); | ||
186 | return NULL; | 185 | return NULL; |
187 | } | 186 | } |
188 | 187 | ||
@@ -370,10 +369,10 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev) | |||
370 | struct sk_buff *clone; | 369 | struct sk_buff *clone; |
371 | int i, plen = 0; | 370 | int i, plen = 0; |
372 | 371 | ||
373 | if ((clone = alloc_skb(0, GFP_ATOMIC)) == NULL) { | 372 | clone = alloc_skb(0, GFP_ATOMIC); |
374 | pr_debug("Can't alloc skb\n"); | 373 | if (clone == NULL) |
375 | goto out_oom; | 374 | goto out_oom; |
376 | } | 375 | |
377 | clone->next = head->next; | 376 | clone->next = head->next; |
378 | head->next = clone; | 377 | head->next = clone; |
379 | skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list; | 378 | skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list; |
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 18ff5df7ec02..1008ce94bc33 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
24 | #include <linux/export.h> | ||
24 | #include <net/net_namespace.h> | 25 | #include <net/net_namespace.h> |
25 | #include <net/ip.h> | 26 | #include <net/ip.h> |
26 | #include <net/sock.h> | 27 | #include <net/sock.h> |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 6f7824e1cea4..331af3b882ac 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -61,6 +61,7 @@ | |||
61 | 61 | ||
62 | #include <linux/proc_fs.h> | 62 | #include <linux/proc_fs.h> |
63 | #include <linux/seq_file.h> | 63 | #include <linux/seq_file.h> |
64 | #include <linux/export.h> | ||
64 | 65 | ||
65 | static struct raw_hashinfo raw_v6_hashinfo = { | 66 | static struct raw_hashinfo raw_v6_hashinfo = { |
66 | .lock = __RW_LOCK_UNLOCKED(raw_v6_hashinfo.lock), | 67 | .lock = __RW_LOCK_UNLOCKED(raw_v6_hashinfo.lock), |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index cc22099ac8b6..dfb164e9051a 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/jhash.h> | 42 | #include <linux/jhash.h> |
43 | #include <linux/skbuff.h> | 43 | #include <linux/skbuff.h> |
44 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
45 | #include <linux/export.h> | ||
45 | 46 | ||
46 | #include <net/sock.h> | 47 | #include <net/sock.h> |
47 | #include <net/snmp.h> | 48 | #include <net/snmp.h> |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 57b82dc1ae91..8473016bba4a 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/capability.h> | 27 | #include <linux/capability.h> |
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/export.h> | ||
29 | #include <linux/types.h> | 30 | #include <linux/types.h> |
30 | #include <linux/times.h> | 31 | #include <linux/times.h> |
31 | #include <linux/socket.h> | 32 | #include <linux/socket.h> |
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 6dcf5e7d661b..166a57c47d39 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/in6.h> | 10 | #include <linux/in6.h> |
11 | #include <linux/ipv6.h> | 11 | #include <linux/ipv6.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/export.h> | ||
13 | #include <net/ndisc.h> | 14 | #include <net/ndisc.h> |
14 | #include <net/ipv6.h> | 15 | #include <net/ipv6.h> |
15 | #include <net/addrconf.h> | 16 | #include <net/addrconf.h> |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 10b2b3165a1a..36131d122a6f 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -2161,12 +2161,18 @@ out: | |||
2161 | return 0; | 2161 | return 0; |
2162 | } | 2162 | } |
2163 | 2163 | ||
2164 | static const struct file_operations tcp6_afinfo_seq_fops = { | ||
2165 | .owner = THIS_MODULE, | ||
2166 | .open = tcp_seq_open, | ||
2167 | .read = seq_read, | ||
2168 | .llseek = seq_lseek, | ||
2169 | .release = seq_release_net | ||
2170 | }; | ||
2171 | |||
2164 | static struct tcp_seq_afinfo tcp6_seq_afinfo = { | 2172 | static struct tcp_seq_afinfo tcp6_seq_afinfo = { |
2165 | .name = "tcp6", | 2173 | .name = "tcp6", |
2166 | .family = AF_INET6, | 2174 | .family = AF_INET6, |
2167 | .seq_fops = { | 2175 | .seq_fops = &tcp6_afinfo_seq_fops, |
2168 | .owner = THIS_MODULE, | ||
2169 | }, | ||
2170 | .seq_ops = { | 2176 | .seq_ops = { |
2171 | .show = tcp6_seq_show, | 2177 | .show = tcp6_seq_show, |
2172 | }, | 2178 | }, |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index f4ca0a5b3457..846f4757eb8d 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -1424,13 +1424,19 @@ int udp6_seq_show(struct seq_file *seq, void *v) | |||
1424 | return 0; | 1424 | return 0; |
1425 | } | 1425 | } |
1426 | 1426 | ||
1427 | static const struct file_operations udp6_afinfo_seq_fops = { | ||
1428 | .owner = THIS_MODULE, | ||
1429 | .open = udp_seq_open, | ||
1430 | .read = seq_read, | ||
1431 | .llseek = seq_lseek, | ||
1432 | .release = seq_release_net | ||
1433 | }; | ||
1434 | |||
1427 | static struct udp_seq_afinfo udp6_seq_afinfo = { | 1435 | static struct udp_seq_afinfo udp6_seq_afinfo = { |
1428 | .name = "udp6", | 1436 | .name = "udp6", |
1429 | .family = AF_INET6, | 1437 | .family = AF_INET6, |
1430 | .udp_table = &udp_table, | 1438 | .udp_table = &udp_table, |
1431 | .seq_fops = { | 1439 | .seq_fops = &udp6_afinfo_seq_fops, |
1432 | .owner = THIS_MODULE, | ||
1433 | }, | ||
1434 | .seq_ops = { | 1440 | .seq_ops = { |
1435 | .show = udp6_seq_show, | 1441 | .show = udp6_seq_show, |
1436 | }, | 1442 | }, |
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c index 986c4de5292e..1d08e21d9f69 100644 --- a/net/ipv6/udplite.c +++ b/net/ipv6/udplite.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * as published by the Free Software Foundation; either version | 11 | * as published by the Free Software Foundation; either version |
12 | * 2 of the License, or (at your option) any later version. | 12 | * 2 of the License, or (at your option) any later version. |
13 | */ | 13 | */ |
14 | #include <linux/export.h> | ||
14 | #include "udp_impl.h" | 15 | #include "udp_impl.h" |
15 | 16 | ||
16 | static int udplitev6_rcv(struct sk_buff *skb) | 17 | static int udplitev6_rcv(struct sk_buff *skb) |
@@ -93,13 +94,20 @@ void udplitev6_exit(void) | |||
93 | } | 94 | } |
94 | 95 | ||
95 | #ifdef CONFIG_PROC_FS | 96 | #ifdef CONFIG_PROC_FS |
97 | |||
98 | static const struct file_operations udplite6_afinfo_seq_fops = { | ||
99 | .owner = THIS_MODULE, | ||
100 | .open = udp_seq_open, | ||
101 | .read = seq_read, | ||
102 | .llseek = seq_lseek, | ||
103 | .release = seq_release_net | ||
104 | }; | ||
105 | |||
96 | static struct udp_seq_afinfo udplite6_seq_afinfo = { | 106 | static struct udp_seq_afinfo udplite6_seq_afinfo = { |
97 | .name = "udplite6", | 107 | .name = "udplite6", |
98 | .family = AF_INET6, | 108 | .family = AF_INET6, |
99 | .udp_table = &udplite_table, | 109 | .udp_table = &udplite_table, |
100 | .seq_fops = { | 110 | .seq_fops = &udplite6_afinfo_seq_fops, |
101 | .owner = THIS_MODULE, | ||
102 | }, | ||
103 | .seq_ops = { | 111 | .seq_ops = { |
104 | .show = udp6_seq_show, | 112 | .show = udp6_seq_show, |
105 | }, | 113 | }, |
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c index 248f0b2a7ee9..f2d72b8a3faa 100644 --- a/net/ipv6/xfrm6_state.c +++ b/net/ipv6/xfrm6_state.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/pfkeyv2.h> | 15 | #include <linux/pfkeyv2.h> |
16 | #include <linux/ipsec.h> | 16 | #include <linux/ipsec.h> |
17 | #include <linux/netfilter_ipv6.h> | 17 | #include <linux/netfilter_ipv6.h> |
18 | #include <linux/export.h> | ||
18 | #include <net/dsfield.h> | 19 | #include <net/dsfield.h> |
19 | #include <net/ipv6.h> | 20 | #include <net/ipv6.h> |
20 | #include <net/addrconf.h> | 21 | #include <net/addrconf.h> |
diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c index 26b5bfcf1d03..f8ba30dfecae 100644 --- a/net/ipx/ipx_proc.c +++ b/net/ipx/ipx_proc.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/proc_fs.h> | 9 | #include <linux/proc_fs.h> |
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <linux/seq_file.h> | 11 | #include <linux/seq_file.h> |
12 | #include <linux/export.h> | ||
12 | #include <net/net_namespace.h> | 13 | #include <net/net_namespace.h> |
13 | #include <net/tcp_states.h> | 14 | #include <net/tcp_states.h> |
14 | #include <net/ipx.h> | 15 | #include <net/ipx.h> |
diff --git a/net/irda/discovery.c b/net/irda/discovery.c index 36c3f037f172..b0b56a339a83 100644 --- a/net/irda/discovery.c +++ b/net/irda/discovery.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/fs.h> | 35 | #include <linux/fs.h> |
36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
37 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
38 | #include <linux/export.h> | ||
38 | 39 | ||
39 | #include <net/irda/irda.h> | 40 | #include <net/irda/irda.h> |
40 | #include <net/irda/irlmp.h> | 41 | #include <net/irda/irlmp.h> |
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c index 3eca35faf2a8..14653b8d664d 100644 --- a/net/irda/irda_device.c +++ b/net/irda/irda_device.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/kmod.h> | 42 | #include <linux/kmod.h> |
43 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
44 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
45 | #include <linux/export.h> | ||
45 | 46 | ||
46 | #include <asm/ioctls.h> | 47 | #include <asm/ioctls.h> |
47 | #include <asm/uaccess.h> | 48 | #include <asm/uaccess.h> |
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 285ccd623ae5..32e3bb026110 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/export.h> | ||
32 | 33 | ||
33 | #include <asm/byteorder.h> | 34 | #include <asm/byteorder.h> |
34 | #include <asm/unaligned.h> | 35 | #include <asm/unaligned.h> |
diff --git a/net/irda/qos.c b/net/irda/qos.c index 4369f7f41bcb..798ffd9a705e 100644 --- a/net/irda/qos.c +++ b/net/irda/qos.c | |||
@@ -30,6 +30,8 @@ | |||
30 | * | 30 | * |
31 | ********************************************************************/ | 31 | ********************************************************************/ |
32 | 32 | ||
33 | #include <linux/export.h> | ||
34 | |||
33 | #include <asm/byteorder.h> | 35 | #include <asm/byteorder.h> |
34 | 36 | ||
35 | #include <net/irda/irda.h> | 37 | #include <net/irda/irda.h> |
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index 34b2ddeacb67..bf8d50c67931 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c | |||
@@ -397,6 +397,7 @@ static void l2tp_recv_dequeue(struct l2tp_session *session) | |||
397 | * expect to send up next, dequeue it and any other | 397 | * expect to send up next, dequeue it and any other |
398 | * in-sequence packets behind it. | 398 | * in-sequence packets behind it. |
399 | */ | 399 | */ |
400 | start: | ||
400 | spin_lock_bh(&session->reorder_q.lock); | 401 | spin_lock_bh(&session->reorder_q.lock); |
401 | skb_queue_walk_safe(&session->reorder_q, skb, tmp) { | 402 | skb_queue_walk_safe(&session->reorder_q, skb, tmp) { |
402 | if (time_after(jiffies, L2TP_SKB_CB(skb)->expires)) { | 403 | if (time_after(jiffies, L2TP_SKB_CB(skb)->expires)) { |
@@ -433,7 +434,7 @@ static void l2tp_recv_dequeue(struct l2tp_session *session) | |||
433 | */ | 434 | */ |
434 | spin_unlock_bh(&session->reorder_q.lock); | 435 | spin_unlock_bh(&session->reorder_q.lock); |
435 | l2tp_recv_dequeue_skb(session, skb); | 436 | l2tp_recv_dequeue_skb(session, skb); |
436 | spin_lock_bh(&session->reorder_q.lock); | 437 | goto start; |
437 | } | 438 | } |
438 | 439 | ||
439 | out: | 440 | out: |
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index 903242111317..e32cab44ea95 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/export.h> | ||
16 | #include <net/net_namespace.h> | 17 | #include <net/net_namespace.h> |
17 | #include <net/llc.h> | 18 | #include <net/llc.h> |
18 | #include <net/llc_pdu.h> | 19 | #include <net/llc_pdu.h> |
diff --git a/net/llc/llc_output.c b/net/llc/llc_output.c index b38a1079a98e..b658cba89fdd 100644 --- a/net/llc/llc_output.c +++ b/net/llc/llc_output.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/netdevice.h> | 18 | #include <linux/netdevice.h> |
19 | #include <linux/trdevice.h> | 19 | #include <linux/trdevice.h> |
20 | #include <linux/skbuff.h> | 20 | #include <linux/skbuff.h> |
21 | #include <linux/export.h> | ||
21 | #include <net/llc.h> | 22 | #include <net/llc.h> |
22 | #include <net/llc_pdu.h> | 23 | #include <net/llc_pdu.h> |
23 | 24 | ||
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c index 7af1ff2d1f19..a1839c004357 100644 --- a/net/llc/llc_proc.c +++ b/net/llc/llc_proc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | #include <linux/export.h> | ||
20 | #include <net/net_namespace.h> | 21 | #include <net/net_namespace.h> |
21 | #include <net/sock.h> | 22 | #include <net/sock.h> |
22 | #include <net/llc.h> | 23 | #include <net/llc.h> |
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index f9ec0d97e349..476b106c0b1c 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include <linux/ieee80211.h> | 39 | #include <linux/ieee80211.h> |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | #include <linux/export.h> | ||
41 | #include <net/mac80211.h> | 42 | #include <net/mac80211.h> |
42 | #include "ieee80211_i.h" | 43 | #include "ieee80211_i.h" |
43 | #include "driver-ops.h" | 44 | #include "driver-ops.h" |
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index fefc7e506754..39d72ccaffb3 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/ieee80211.h> | 16 | #include <linux/ieee80211.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/export.h> | ||
18 | #include <net/mac80211.h> | 19 | #include <net/mac80211.h> |
19 | #include "ieee80211_i.h" | 20 | #include "ieee80211_i.h" |
20 | #include "driver-ops.h" | 21 | #include "driver-ops.h" |
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 7e0ac9791fd6..810cfbea6ad1 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/ieee80211.h> | 16 | #include <linux/ieee80211.h> |
17 | #include <linux/export.h> | ||
17 | #include <net/mac80211.h> | 18 | #include <net/mac80211.h> |
18 | #include "ieee80211_i.h" | 19 | #include "ieee80211_i.h" |
19 | #include "rate.h" | 20 | #include "rate.h" |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 17a5220ed450..87a89741432d 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/rcupdate.h> | 15 | #include <linux/rcupdate.h> |
16 | #include <linux/rtnetlink.h> | 16 | #include <linux/rtnetlink.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/export.h> | ||
18 | #include <net/mac80211.h> | 19 | #include <net/mac80211.h> |
19 | #include "ieee80211_i.h" | 20 | #include "ieee80211_i.h" |
20 | #include "driver-ops.h" | 21 | #include "driver-ops.h" |
diff --git a/net/mac80211/led.c b/net/mac80211/led.c index 14590332c81c..1bf7903496f8 100644 --- a/net/mac80211/led.c +++ b/net/mac80211/led.c | |||
@@ -9,6 +9,7 @@ | |||
9 | /* just for IFNAMSIZ */ | 9 | /* just for IFNAMSIZ */ |
10 | #include <linux/if.h> | 10 | #include <linux/if.h> |
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/export.h> | ||
12 | #include "led.h" | 13 | #include "led.h" |
13 | 14 | ||
14 | void ieee80211_led_rx(struct ieee80211_local *local) | 15 | void ieee80211_led_rx(struct ieee80211_local *local) |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 8925138736ef..a6ad19757bac 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -16,10 +16,12 @@ | |||
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/if_arp.h> | 17 | #include <linux/if_arp.h> |
18 | #include <linux/etherdevice.h> | 18 | #include <linux/etherdevice.h> |
19 | #include <linux/moduleparam.h> | ||
19 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
20 | #include <linux/pm_qos.h> | 21 | #include <linux/pm_qos.h> |
21 | #include <linux/crc32.h> | 22 | #include <linux/crc32.h> |
22 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/export.h> | ||
23 | #include <net/mac80211.h> | 25 | #include <net/mac80211.h> |
24 | #include <asm/unaligned.h> | 26 | #include <asm/unaligned.h> |
25 | 27 | ||
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 767d26b3f98b..ebd8cccac8f2 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | #include <linux/export.h> | ||
15 | #include <net/mac80211.h> | 16 | #include <net/mac80211.h> |
16 | #include "ieee80211_i.h" | 17 | #include "ieee80211_i.h" |
17 | #include "driver-trace.h" | 18 | #include "driver-trace.h" |
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index ff5c3aa48a15..5a5a7767d541 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/rtnetlink.h> | 12 | #include <linux/rtnetlink.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/module.h> | ||
14 | #include "rate.h" | 15 | #include "rate.h" |
15 | #include "ieee80211_i.h" | 16 | #include "ieee80211_i.h" |
16 | #include "debugfs.h" | 17 | #include "debugfs.h" |
diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c index a290ad231d77..d5a56226e675 100644 --- a/net/mac80211/rc80211_minstrel_debugfs.c +++ b/net/mac80211/rc80211_minstrel_debugfs.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/debugfs.h> | 50 | #include <linux/debugfs.h> |
51 | #include <linux/ieee80211.h> | 51 | #include <linux/ieee80211.h> |
52 | #include <linux/slab.h> | 52 | #include <linux/slab.h> |
53 | #include <linux/export.h> | ||
53 | #include <net/mac80211.h> | 54 | #include <net/mac80211.h> |
54 | #include "rc80211_minstrel.h" | 55 | #include "rc80211_minstrel.h" |
55 | 56 | ||
diff --git a/net/mac80211/rc80211_minstrel_ht_debugfs.c b/net/mac80211/rc80211_minstrel_ht_debugfs.c index cefcb5d2dae6..e788f76a1dfe 100644 --- a/net/mac80211/rc80211_minstrel_ht_debugfs.c +++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
11 | #include <linux/debugfs.h> | 11 | #include <linux/debugfs.h> |
12 | #include <linux/ieee80211.h> | 12 | #include <linux/ieee80211.h> |
13 | #include <linux/export.h> | ||
13 | #include <net/mac80211.h> | 14 | #include <net/mac80211.h> |
14 | #include "rc80211_minstrel.h" | 15 | #include "rc80211_minstrel.h" |
15 | #include "rc80211_minstrel_ht.h" | 16 | #include "rc80211_minstrel_ht.h" |
diff --git a/net/mac80211/rc80211_pid_debugfs.c b/net/mac80211/rc80211_pid_debugfs.c index 4851e9e2daed..c97a0657c043 100644 --- a/net/mac80211/rc80211_pid_debugfs.c +++ b/net/mac80211/rc80211_pid_debugfs.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/export.h> | ||
16 | 17 | ||
17 | #include <net/mac80211.h> | 18 | #include <net/mac80211.h> |
18 | #include "rate.h" | 19 | #include "rate.h" |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5f6751a07405..4eafbfd891d5 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include <linux/etherdevice.h> | 17 | #include <linux/etherdevice.h> |
18 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
19 | #include <linux/export.h> | ||
19 | #include <net/mac80211.h> | 20 | #include <net/mac80211.h> |
20 | #include <net/ieee80211_radiotap.h> | 21 | #include <net/ieee80211_radiotap.h> |
21 | 22 | ||
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 7107159d4155..81863031e0a3 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/pm_qos.h> | 17 | #include <linux/pm_qos.h> |
18 | #include <net/sch_generic.h> | 18 | #include <net/sch_generic.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/export.h> | ||
20 | #include <net/mac80211.h> | 21 | #include <net/mac80211.h> |
21 | 22 | ||
22 | #include "ieee80211_i.h" | 23 | #include "ieee80211_i.h" |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 83b800d17a9a..a9da6ee69803 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/export.h> | ||
12 | #include <net/mac80211.h> | 13 | #include <net/mac80211.h> |
13 | #include "ieee80211_i.h" | 14 | #include "ieee80211_i.h" |
14 | #include "rate.h" | 15 | #include "rate.h" |
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c index f49d00a4c7fd..51077a956a83 100644 --- a/net/mac80211/tkip.c +++ b/net/mac80211/tkip.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/export.h> | ||
13 | #include <asm/unaligned.h> | 14 | #include <asm/unaligned.h> |
14 | 15 | ||
15 | #include <net/mac80211.h> | 16 | #include <net/mac80211.h> |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index facc80d23b0c..8d31933abe6a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/etherdevice.h> | 18 | #include <linux/etherdevice.h> |
19 | #include <linux/bitmap.h> | 19 | #include <linux/bitmap.h> |
20 | #include <linux/rcupdate.h> | 20 | #include <linux/rcupdate.h> |
21 | #include <linux/export.h> | ||
21 | #include <net/net_namespace.h> | 22 | #include <net/net_namespace.h> |
22 | #include <net/ieee80211_radiotap.h> | 23 | #include <net/ieee80211_radiotap.h> |
23 | #include <net/cfg80211.h> | 24 | #include <net/cfg80211.h> |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 1118393d79de..c499a16b7200 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <net/mac80211.h> | 14 | #include <net/mac80211.h> |
15 | #include <linux/netdevice.h> | 15 | #include <linux/netdevice.h> |
16 | #include <linux/export.h> | ||
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
17 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
18 | #include <linux/skbuff.h> | 19 | #include <linux/skbuff.h> |
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 3346829ea07f..afca6c78948c 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -180,17 +180,16 @@ next_hook: | |||
180 | if (ret == 0) | 180 | if (ret == 0) |
181 | ret = -EPERM; | 181 | ret = -EPERM; |
182 | } else if ((verdict & NF_VERDICT_MASK) == NF_QUEUE) { | 182 | } else if ((verdict & NF_VERDICT_MASK) == NF_QUEUE) { |
183 | ret = nf_queue(skb, elem, pf, hook, indev, outdev, okfn, | 183 | int err = nf_queue(skb, elem, pf, hook, indev, outdev, okfn, |
184 | verdict >> NF_VERDICT_QBITS); | 184 | verdict >> NF_VERDICT_QBITS); |
185 | if (ret < 0) { | 185 | if (err < 0) { |
186 | if (ret == -ECANCELED) | 186 | if (err == -ECANCELED) |
187 | goto next_hook; | 187 | goto next_hook; |
188 | if (ret == -ESRCH && | 188 | if (err == -ESRCH && |
189 | (verdict & NF_VERDICT_FLAG_QUEUE_BYPASS)) | 189 | (verdict & NF_VERDICT_FLAG_QUEUE_BYPASS)) |
190 | goto next_hook; | 190 | goto next_hook; |
191 | kfree_skb(skb); | 191 | kfree_skb(skb); |
192 | } | 192 | } |
193 | ret = 0; | ||
194 | } | 193 | } |
195 | rcu_read_unlock(); | 194 | rcu_read_unlock(); |
196 | return ret; | 195 | return ret; |
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index d7e86ef9d23a..86137b558f45 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c | |||
@@ -1699,10 +1699,8 @@ ip_set_init(void) | |||
1699 | 1699 | ||
1700 | ip_set_list = kzalloc(sizeof(struct ip_set *) * ip_set_max, | 1700 | ip_set_list = kzalloc(sizeof(struct ip_set *) * ip_set_max, |
1701 | GFP_KERNEL); | 1701 | GFP_KERNEL); |
1702 | if (!ip_set_list) { | 1702 | if (!ip_set_list) |
1703 | pr_err("ip_set: Unable to create ip_set_list\n"); | ||
1704 | return -ENOMEM; | 1703 | return -ENOMEM; |
1705 | } | ||
1706 | 1704 | ||
1707 | ret = nfnetlink_subsys_register(&ip_set_netlink_subsys); | 1705 | ret = nfnetlink_subsys_register(&ip_set_netlink_subsys); |
1708 | if (ret != 0) { | 1706 | if (ret != 0) { |
diff --git a/net/netfilter/ipset/ip_set_getport.c b/net/netfilter/ipset/ip_set_getport.c index 757143b2240a..052579fe389a 100644 --- a/net/netfilter/ipset/ip_set_getport.c +++ b/net/netfilter/ipset/ip_set_getport.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <net/ipv6.h> | 17 | #include <net/ipv6.h> |
18 | 18 | ||
19 | #include <linux/netfilter/ipset/ip_set_getport.h> | 19 | #include <linux/netfilter/ipset/ip_set_getport.h> |
20 | #include <linux/export.h> | ||
20 | 21 | ||
21 | /* We must handle non-linear skbs */ | 22 | /* We must handle non-linear skbs */ |
22 | static bool | 23 | static bool |
diff --git a/net/netfilter/ipset/pfxlen.c b/net/netfilter/ipset/pfxlen.c index bd13d66220f1..4f29fa97044b 100644 --- a/net/netfilter/ipset/pfxlen.c +++ b/net/netfilter/ipset/pfxlen.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/export.h> | ||
1 | #include <linux/netfilter/ipset/pfxlen.h> | 2 | #include <linux/netfilter/ipset/pfxlen.h> |
2 | 3 | ||
3 | /* | 4 | /* |
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index 4f77bb16d22a..093cc327020f 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c | |||
@@ -188,14 +188,13 @@ ip_vs_conn_stats(struct ip_vs_conn *cp, struct ip_vs_service *svc) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | 190 | ||
191 | static inline int | 191 | static inline void |
192 | ip_vs_set_state(struct ip_vs_conn *cp, int direction, | 192 | ip_vs_set_state(struct ip_vs_conn *cp, int direction, |
193 | const struct sk_buff *skb, | 193 | const struct sk_buff *skb, |
194 | struct ip_vs_proto_data *pd) | 194 | struct ip_vs_proto_data *pd) |
195 | { | 195 | { |
196 | if (unlikely(!pd->pp->state_transition)) | 196 | if (likely(pd->pp->state_transition)) |
197 | return 0; | 197 | pd->pp->state_transition(cp, direction, skb, pd); |
198 | return pd->pp->state_transition(cp, direction, skb, pd); | ||
199 | } | 198 | } |
200 | 199 | ||
201 | static inline int | 200 | static inline int |
@@ -530,7 +529,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, | |||
530 | a cache_bypass connection entry */ | 529 | a cache_bypass connection entry */ |
531 | ipvs = net_ipvs(net); | 530 | ipvs = net_ipvs(net); |
532 | if (ipvs->sysctl_cache_bypass && svc->fwmark && unicast) { | 531 | if (ipvs->sysctl_cache_bypass && svc->fwmark && unicast) { |
533 | int ret, cs; | 532 | int ret; |
534 | struct ip_vs_conn *cp; | 533 | struct ip_vs_conn *cp; |
535 | unsigned int flags = (svc->flags & IP_VS_SVC_F_ONEPACKET && | 534 | unsigned int flags = (svc->flags & IP_VS_SVC_F_ONEPACKET && |
536 | iph.protocol == IPPROTO_UDP)? | 535 | iph.protocol == IPPROTO_UDP)? |
@@ -557,7 +556,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, | |||
557 | ip_vs_in_stats(cp, skb); | 556 | ip_vs_in_stats(cp, skb); |
558 | 557 | ||
559 | /* set state */ | 558 | /* set state */ |
560 | cs = ip_vs_set_state(cp, IP_VS_DIR_INPUT, skb, pd); | 559 | ip_vs_set_state(cp, IP_VS_DIR_INPUT, skb, pd); |
561 | 560 | ||
562 | /* transmit the first SYN packet */ | 561 | /* transmit the first SYN packet */ |
563 | ret = cp->packet_xmit(skb, cp, pd->pp); | 562 | ret = cp->packet_xmit(skb, cp, pd->pp); |
@@ -1490,7 +1489,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af) | |||
1490 | struct ip_vs_protocol *pp; | 1489 | struct ip_vs_protocol *pp; |
1491 | struct ip_vs_proto_data *pd; | 1490 | struct ip_vs_proto_data *pd; |
1492 | struct ip_vs_conn *cp; | 1491 | struct ip_vs_conn *cp; |
1493 | int ret, restart, pkts; | 1492 | int ret, pkts; |
1494 | struct netns_ipvs *ipvs; | 1493 | struct netns_ipvs *ipvs; |
1495 | 1494 | ||
1496 | /* Already marked as IPVS request or reply? */ | 1495 | /* Already marked as IPVS request or reply? */ |
@@ -1591,7 +1590,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af) | |||
1591 | } | 1590 | } |
1592 | 1591 | ||
1593 | ip_vs_in_stats(cp, skb); | 1592 | ip_vs_in_stats(cp, skb); |
1594 | restart = ip_vs_set_state(cp, IP_VS_DIR_INPUT, skb, pd); | 1593 | ip_vs_set_state(cp, IP_VS_DIR_INPUT, skb, pd); |
1595 | if (cp->packet_xmit) | 1594 | if (cp->packet_xmit) |
1596 | ret = cp->packet_xmit(skb, cp, pp); | 1595 | ret = cp->packet_xmit(skb, cp, pp); |
1597 | /* do not touch skb anymore */ | 1596 | /* do not touch skb anymore */ |
@@ -1878,10 +1877,9 @@ static int __net_init __ip_vs_init(struct net *net) | |||
1878 | struct netns_ipvs *ipvs; | 1877 | struct netns_ipvs *ipvs; |
1879 | 1878 | ||
1880 | ipvs = net_generic(net, ip_vs_net_id); | 1879 | ipvs = net_generic(net, ip_vs_net_id); |
1881 | if (ipvs == NULL) { | 1880 | if (ipvs == NULL) |
1882 | pr_err("%s(): no memory.\n", __func__); | ||
1883 | return -ENOMEM; | 1881 | return -ENOMEM; |
1884 | } | 1882 | |
1885 | /* Hold the beast until a service is registerd */ | 1883 | /* Hold the beast until a service is registerd */ |
1886 | ipvs->enable = 0; | 1884 | ipvs->enable = 0; |
1887 | ipvs->net = net; | 1885 | ipvs->net = net; |
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index e3be48bf4dcd..008bf97cc91a 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -856,15 +856,12 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest, | |||
856 | } | 856 | } |
857 | 857 | ||
858 | dest = kzalloc(sizeof(struct ip_vs_dest), GFP_KERNEL); | 858 | dest = kzalloc(sizeof(struct ip_vs_dest), GFP_KERNEL); |
859 | if (dest == NULL) { | 859 | if (dest == NULL) |
860 | pr_err("%s(): no memory.\n", __func__); | ||
861 | return -ENOMEM; | 860 | return -ENOMEM; |
862 | } | 861 | |
863 | dest->stats.cpustats = alloc_percpu(struct ip_vs_cpu_stats); | 862 | dest->stats.cpustats = alloc_percpu(struct ip_vs_cpu_stats); |
864 | if (!dest->stats.cpustats) { | 863 | if (!dest->stats.cpustats) |
865 | pr_err("%s() alloc_percpu failed\n", __func__); | ||
866 | goto err_alloc; | 864 | goto err_alloc; |
867 | } | ||
868 | 865 | ||
869 | dest->af = svc->af; | 866 | dest->af = svc->af; |
870 | dest->protocol = svc->protocol; | 867 | dest->protocol = svc->protocol; |
@@ -1168,10 +1165,8 @@ ip_vs_add_service(struct net *net, struct ip_vs_service_user_kern *u, | |||
1168 | goto out_err; | 1165 | goto out_err; |
1169 | } | 1166 | } |
1170 | svc->stats.cpustats = alloc_percpu(struct ip_vs_cpu_stats); | 1167 | svc->stats.cpustats = alloc_percpu(struct ip_vs_cpu_stats); |
1171 | if (!svc->stats.cpustats) { | 1168 | if (!svc->stats.cpustats) |
1172 | pr_err("%s() alloc_percpu failed\n", __func__); | ||
1173 | goto out_err; | 1169 | goto out_err; |
1174 | } | ||
1175 | 1170 | ||
1176 | /* I'm the first user of the service */ | 1171 | /* I'm the first user of the service */ |
1177 | atomic_set(&svc->usecnt, 0); | 1172 | atomic_set(&svc->usecnt, 0); |
@@ -3326,10 +3321,8 @@ static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info *info) | |||
3326 | int ret = 0, cmd; | 3321 | int ret = 0, cmd; |
3327 | int need_full_svc = 0, need_full_dest = 0; | 3322 | int need_full_svc = 0, need_full_dest = 0; |
3328 | struct net *net; | 3323 | struct net *net; |
3329 | struct netns_ipvs *ipvs; | ||
3330 | 3324 | ||
3331 | net = skb_sknet(skb); | 3325 | net = skb_sknet(skb); |
3332 | ipvs = net_ipvs(net); | ||
3333 | cmd = info->genlhdr->cmd; | 3326 | cmd = info->genlhdr->cmd; |
3334 | 3327 | ||
3335 | mutex_lock(&__ip_vs_mutex); | 3328 | mutex_lock(&__ip_vs_mutex); |
@@ -3421,10 +3414,8 @@ static int ip_vs_genl_get_cmd(struct sk_buff *skb, struct genl_info *info) | |||
3421 | void *reply; | 3414 | void *reply; |
3422 | int ret, cmd, reply_cmd; | 3415 | int ret, cmd, reply_cmd; |
3423 | struct net *net; | 3416 | struct net *net; |
3424 | struct netns_ipvs *ipvs; | ||
3425 | 3417 | ||
3426 | net = skb_sknet(skb); | 3418 | net = skb_sknet(skb); |
3427 | ipvs = net_ipvs(net); | ||
3428 | cmd = info->genlhdr->cmd; | 3419 | cmd = info->genlhdr->cmd; |
3429 | 3420 | ||
3430 | if (cmd == IPVS_CMD_GET_SERVICE) | 3421 | if (cmd == IPVS_CMD_GET_SERVICE) |
@@ -3720,10 +3711,9 @@ int __net_init ip_vs_control_net_init(struct net *net) | |||
3720 | 3711 | ||
3721 | /* procfs stats */ | 3712 | /* procfs stats */ |
3722 | ipvs->tot_stats.cpustats = alloc_percpu(struct ip_vs_cpu_stats); | 3713 | ipvs->tot_stats.cpustats = alloc_percpu(struct ip_vs_cpu_stats); |
3723 | if (!ipvs->tot_stats.cpustats) { | 3714 | if (!ipvs->tot_stats.cpustats) |
3724 | pr_err("%s(): alloc_percpu.\n", __func__); | ||
3725 | return -ENOMEM; | 3715 | return -ENOMEM; |
3726 | } | 3716 | |
3727 | spin_lock_init(&ipvs->tot_stats.lock); | 3717 | spin_lock_init(&ipvs->tot_stats.lock); |
3728 | 3718 | ||
3729 | proc_net_fops_create(net, "ip_vs", 0, &ip_vs_info_fops); | 3719 | proc_net_fops_create(net, "ip_vs", 0, &ip_vs_info_fops); |
diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c index 95fd0d14200b..1c269e56200a 100644 --- a/net/netfilter/ipvs/ip_vs_dh.c +++ b/net/netfilter/ipvs/ip_vs_dh.c | |||
@@ -150,10 +150,9 @@ static int ip_vs_dh_init_svc(struct ip_vs_service *svc) | |||
150 | /* allocate the DH table for this service */ | 150 | /* allocate the DH table for this service */ |
151 | tbl = kmalloc(sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE, | 151 | tbl = kmalloc(sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE, |
152 | GFP_ATOMIC); | 152 | GFP_ATOMIC); |
153 | if (tbl == NULL) { | 153 | if (tbl == NULL) |
154 | pr_err("%s(): no memory\n", __func__); | ||
155 | return -ENOMEM; | 154 | return -ENOMEM; |
156 | } | 155 | |
157 | svc->sched_data = tbl; | 156 | svc->sched_data = tbl; |
158 | IP_VS_DBG(6, "DH hash table (memory=%Zdbytes) allocated for " | 157 | IP_VS_DBG(6, "DH hash table (memory=%Zdbytes) allocated for " |
159 | "current service\n", | 158 | "current service\n", |
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c index 4490a32ad5b2..538d74ee4f68 100644 --- a/net/netfilter/ipvs/ip_vs_ftp.c +++ b/net/netfilter/ipvs/ip_vs_ftp.c | |||
@@ -52,8 +52,9 @@ | |||
52 | * List of ports (up to IP_VS_APP_MAX_PORTS) to be handled by helper | 52 | * List of ports (up to IP_VS_APP_MAX_PORTS) to be handled by helper |
53 | * First port is set to the default port. | 53 | * First port is set to the default port. |
54 | */ | 54 | */ |
55 | static unsigned int ports_count = 1; | ||
55 | static unsigned short ports[IP_VS_APP_MAX_PORTS] = {21, 0}; | 56 | static unsigned short ports[IP_VS_APP_MAX_PORTS] = {21, 0}; |
56 | module_param_array(ports, ushort, NULL, 0); | 57 | module_param_array(ports, ushort, &ports_count, 0444); |
57 | MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands"); | 58 | MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands"); |
58 | 59 | ||
59 | 60 | ||
@@ -449,7 +450,7 @@ static int __net_init __ip_vs_ftp_init(struct net *net) | |||
449 | if (ret) | 450 | if (ret) |
450 | goto err_exit; | 451 | goto err_exit; |
451 | 452 | ||
452 | for (i=0; i<IP_VS_APP_MAX_PORTS; i++) { | 453 | for (i = 0; i < ports_count; i++) { |
453 | if (!ports[i]) | 454 | if (!ports[i]) |
454 | continue; | 455 | continue; |
455 | ret = register_ip_vs_app_inc(net, app, app->protocol, ports[i]); | 456 | ret = register_ip_vs_app_inc(net, app, app->protocol, ports[i]); |
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c index 87e40ea77a95..0f16283fd058 100644 --- a/net/netfilter/ipvs/ip_vs_lblc.c +++ b/net/netfilter/ipvs/ip_vs_lblc.c | |||
@@ -202,10 +202,8 @@ ip_vs_lblc_new(struct ip_vs_lblc_table *tbl, const union nf_inet_addr *daddr, | |||
202 | en = ip_vs_lblc_get(dest->af, tbl, daddr); | 202 | en = ip_vs_lblc_get(dest->af, tbl, daddr); |
203 | if (!en) { | 203 | if (!en) { |
204 | en = kmalloc(sizeof(*en), GFP_ATOMIC); | 204 | en = kmalloc(sizeof(*en), GFP_ATOMIC); |
205 | if (!en) { | 205 | if (!en) |
206 | pr_err("%s(): no memory\n", __func__); | ||
207 | return NULL; | 206 | return NULL; |
208 | } | ||
209 | 207 | ||
210 | en->af = dest->af; | 208 | en->af = dest->af; |
211 | ip_vs_addr_copy(dest->af, &en->addr, daddr); | 209 | ip_vs_addr_copy(dest->af, &en->addr, daddr); |
@@ -345,10 +343,9 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc) | |||
345 | * Allocate the ip_vs_lblc_table for this service | 343 | * Allocate the ip_vs_lblc_table for this service |
346 | */ | 344 | */ |
347 | tbl = kmalloc(sizeof(*tbl), GFP_ATOMIC); | 345 | tbl = kmalloc(sizeof(*tbl), GFP_ATOMIC); |
348 | if (tbl == NULL) { | 346 | if (tbl == NULL) |
349 | pr_err("%s(): no memory\n", __func__); | ||
350 | return -ENOMEM; | 347 | return -ENOMEM; |
351 | } | 348 | |
352 | svc->sched_data = tbl; | 349 | svc->sched_data = tbl; |
353 | IP_VS_DBG(6, "LBLC hash table (memory=%Zdbytes) allocated for " | 350 | IP_VS_DBG(6, "LBLC hash table (memory=%Zdbytes) allocated for " |
354 | "current service\n", sizeof(*tbl)); | 351 | "current service\n", sizeof(*tbl)); |
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c index 90f618ab6dda..eec797f8cce7 100644 --- a/net/netfilter/ipvs/ip_vs_lblcr.c +++ b/net/netfilter/ipvs/ip_vs_lblcr.c | |||
@@ -112,10 +112,8 @@ ip_vs_dest_set_insert(struct ip_vs_dest_set *set, struct ip_vs_dest *dest) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | e = kmalloc(sizeof(*e), GFP_ATOMIC); | 114 | e = kmalloc(sizeof(*e), GFP_ATOMIC); |
115 | if (e == NULL) { | 115 | if (e == NULL) |
116 | pr_err("%s(): no memory\n", __func__); | ||
117 | return NULL; | 116 | return NULL; |
118 | } | ||
119 | 117 | ||
120 | atomic_inc(&dest->refcnt); | 118 | atomic_inc(&dest->refcnt); |
121 | e->dest = dest; | 119 | e->dest = dest; |
@@ -373,10 +371,8 @@ ip_vs_lblcr_new(struct ip_vs_lblcr_table *tbl, const union nf_inet_addr *daddr, | |||
373 | en = ip_vs_lblcr_get(dest->af, tbl, daddr); | 371 | en = ip_vs_lblcr_get(dest->af, tbl, daddr); |
374 | if (!en) { | 372 | if (!en) { |
375 | en = kmalloc(sizeof(*en), GFP_ATOMIC); | 373 | en = kmalloc(sizeof(*en), GFP_ATOMIC); |
376 | if (!en) { | 374 | if (!en) |
377 | pr_err("%s(): no memory\n", __func__); | ||
378 | return NULL; | 375 | return NULL; |
379 | } | ||
380 | 376 | ||
381 | en->af = dest->af; | 377 | en->af = dest->af; |
382 | ip_vs_addr_copy(dest->af, &en->addr, daddr); | 378 | ip_vs_addr_copy(dest->af, &en->addr, daddr); |
@@ -516,10 +512,9 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc) | |||
516 | * Allocate the ip_vs_lblcr_table for this service | 512 | * Allocate the ip_vs_lblcr_table for this service |
517 | */ | 513 | */ |
518 | tbl = kmalloc(sizeof(*tbl), GFP_ATOMIC); | 514 | tbl = kmalloc(sizeof(*tbl), GFP_ATOMIC); |
519 | if (tbl == NULL) { | 515 | if (tbl == NULL) |
520 | pr_err("%s(): no memory\n", __func__); | ||
521 | return -ENOMEM; | 516 | return -ENOMEM; |
522 | } | 517 | |
523 | svc->sched_data = tbl; | 518 | svc->sched_data = tbl; |
524 | IP_VS_DBG(6, "LBLCR hash table (memory=%Zdbytes) allocated for " | 519 | IP_VS_DBG(6, "LBLCR hash table (memory=%Zdbytes) allocated for " |
525 | "current service\n", sizeof(*tbl)); | 520 | "current service\n", sizeof(*tbl)); |
diff --git a/net/netfilter/ipvs/ip_vs_nfct.c b/net/netfilter/ipvs/ip_vs_nfct.c index f454c80df0a7..022e77e1e766 100644 --- a/net/netfilter/ipvs/ip_vs_nfct.c +++ b/net/netfilter/ipvs/ip_vs_nfct.c | |||
@@ -127,7 +127,7 @@ ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, int outin) | |||
127 | nf_conntrack_alter_reply(ct, &new_tuple); | 127 | nf_conntrack_alter_reply(ct, &new_tuple); |
128 | } | 128 | } |
129 | 129 | ||
130 | int ip_vs_confirm_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp) | 130 | int ip_vs_confirm_conntrack(struct sk_buff *skb) |
131 | { | 131 | { |
132 | return nf_conntrack_confirm(skb); | 132 | return nf_conntrack_confirm(skb); |
133 | } | 133 | } |
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c index 52d073c105e9..85312939695f 100644 --- a/net/netfilter/ipvs/ip_vs_proto.c +++ b/net/netfilter/ipvs/ip_vs_proto.c | |||
@@ -74,10 +74,9 @@ register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp) | |||
74 | struct ip_vs_proto_data *pd = | 74 | struct ip_vs_proto_data *pd = |
75 | kzalloc(sizeof(struct ip_vs_proto_data), GFP_ATOMIC); | 75 | kzalloc(sizeof(struct ip_vs_proto_data), GFP_ATOMIC); |
76 | 76 | ||
77 | if (!pd) { | 77 | if (!pd) |
78 | pr_err("%s(): no memory.\n", __func__); | ||
79 | return -ENOMEM; | 78 | return -ENOMEM; |
80 | } | 79 | |
81 | pd->pp = pp; /* For speed issues */ | 80 | pd->pp = pp; /* For speed issues */ |
82 | pd->next = ipvs->proto_data_table[hash]; | 81 | pd->next = ipvs->proto_data_table[hash]; |
83 | ipvs->proto_data_table[hash] = pd; | 82 | ipvs->proto_data_table[hash] = pd; |
diff --git a/net/netfilter/ipvs/ip_vs_proto_sctp.c b/net/netfilter/ipvs/ip_vs_proto_sctp.c index d12ed53ec95f..1fbf7a2816f5 100644 --- a/net/netfilter/ipvs/ip_vs_proto_sctp.c +++ b/net/netfilter/ipvs/ip_vs_proto_sctp.c | |||
@@ -906,7 +906,7 @@ static const char *sctp_state_name(int state) | |||
906 | return "?"; | 906 | return "?"; |
907 | } | 907 | } |
908 | 908 | ||
909 | static inline int | 909 | static inline void |
910 | set_sctp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, | 910 | set_sctp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, |
911 | int direction, const struct sk_buff *skb) | 911 | int direction, const struct sk_buff *skb) |
912 | { | 912 | { |
@@ -924,7 +924,7 @@ set_sctp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, | |||
924 | sch = skb_header_pointer(skb, ihl + sizeof(sctp_sctphdr_t), | 924 | sch = skb_header_pointer(skb, ihl + sizeof(sctp_sctphdr_t), |
925 | sizeof(_sctpch), &_sctpch); | 925 | sizeof(_sctpch), &_sctpch); |
926 | if (sch == NULL) | 926 | if (sch == NULL) |
927 | return 0; | 927 | return; |
928 | 928 | ||
929 | chunk_type = sch->type; | 929 | chunk_type = sch->type; |
930 | /* | 930 | /* |
@@ -993,21 +993,15 @@ set_sctp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, | |||
993 | cp->timeout = pd->timeout_table[cp->state = next_state]; | 993 | cp->timeout = pd->timeout_table[cp->state = next_state]; |
994 | else /* What to do ? */ | 994 | else /* What to do ? */ |
995 | cp->timeout = sctp_timeouts[cp->state = next_state]; | 995 | cp->timeout = sctp_timeouts[cp->state = next_state]; |
996 | |||
997 | return 1; | ||
998 | } | 996 | } |
999 | 997 | ||
1000 | static int | 998 | static void |
1001 | sctp_state_transition(struct ip_vs_conn *cp, int direction, | 999 | sctp_state_transition(struct ip_vs_conn *cp, int direction, |
1002 | const struct sk_buff *skb, struct ip_vs_proto_data *pd) | 1000 | const struct sk_buff *skb, struct ip_vs_proto_data *pd) |
1003 | { | 1001 | { |
1004 | int ret = 0; | ||
1005 | |||
1006 | spin_lock(&cp->lock); | 1002 | spin_lock(&cp->lock); |
1007 | ret = set_sctp_state(pd, cp, direction, skb); | 1003 | set_sctp_state(pd, cp, direction, skb); |
1008 | spin_unlock(&cp->lock); | 1004 | spin_unlock(&cp->lock); |
1009 | |||
1010 | return ret; | ||
1011 | } | 1005 | } |
1012 | 1006 | ||
1013 | static inline __u16 sctp_app_hashkey(__be16 port) | 1007 | static inline __u16 sctp_app_hashkey(__be16 port) |
diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c index c0cc341b840d..ef8641f7af83 100644 --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c | |||
@@ -546,7 +546,7 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, | |||
546 | /* | 546 | /* |
547 | * Handle state transitions | 547 | * Handle state transitions |
548 | */ | 548 | */ |
549 | static int | 549 | static void |
550 | tcp_state_transition(struct ip_vs_conn *cp, int direction, | 550 | tcp_state_transition(struct ip_vs_conn *cp, int direction, |
551 | const struct sk_buff *skb, | 551 | const struct sk_buff *skb, |
552 | struct ip_vs_proto_data *pd) | 552 | struct ip_vs_proto_data *pd) |
@@ -561,13 +561,11 @@ tcp_state_transition(struct ip_vs_conn *cp, int direction, | |||
561 | 561 | ||
562 | th = skb_header_pointer(skb, ihl, sizeof(_tcph), &_tcph); | 562 | th = skb_header_pointer(skb, ihl, sizeof(_tcph), &_tcph); |
563 | if (th == NULL) | 563 | if (th == NULL) |
564 | return 0; | 564 | return; |
565 | 565 | ||
566 | spin_lock(&cp->lock); | 566 | spin_lock(&cp->lock); |
567 | set_tcp_state(pd, cp, direction, th); | 567 | set_tcp_state(pd, cp, direction, th); |
568 | spin_unlock(&cp->lock); | 568 | spin_unlock(&cp->lock); |
569 | |||
570 | return 1; | ||
571 | } | 569 | } |
572 | 570 | ||
573 | static inline __u16 tcp_app_hashkey(__be16 port) | 571 | static inline __u16 tcp_app_hashkey(__be16 port) |
diff --git a/net/netfilter/ipvs/ip_vs_proto_udp.c b/net/netfilter/ipvs/ip_vs_proto_udp.c index f1282cbe6fe3..f4b7262896bb 100644 --- a/net/netfilter/ipvs/ip_vs_proto_udp.c +++ b/net/netfilter/ipvs/ip_vs_proto_udp.c | |||
@@ -454,18 +454,17 @@ static const char * udp_state_name(int state) | |||
454 | return udp_state_name_table[state] ? udp_state_name_table[state] : "?"; | 454 | return udp_state_name_table[state] ? udp_state_name_table[state] : "?"; |
455 | } | 455 | } |
456 | 456 | ||
457 | static int | 457 | static void |
458 | udp_state_transition(struct ip_vs_conn *cp, int direction, | 458 | udp_state_transition(struct ip_vs_conn *cp, int direction, |
459 | const struct sk_buff *skb, | 459 | const struct sk_buff *skb, |
460 | struct ip_vs_proto_data *pd) | 460 | struct ip_vs_proto_data *pd) |
461 | { | 461 | { |
462 | if (unlikely(!pd)) { | 462 | if (unlikely(!pd)) { |
463 | pr_err("UDP no ns data\n"); | 463 | pr_err("UDP no ns data\n"); |
464 | return 0; | 464 | return; |
465 | } | 465 | } |
466 | 466 | ||
467 | cp->timeout = pd->timeout_table[IP_VS_UDP_S_NORMAL]; | 467 | cp->timeout = pd->timeout_table[IP_VS_UDP_S_NORMAL]; |
468 | return 1; | ||
469 | } | 468 | } |
470 | 469 | ||
471 | static void __udp_init(struct net *net, struct ip_vs_proto_data *pd) | 470 | static void __udp_init(struct net *net, struct ip_vs_proto_data *pd) |
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c index b5e2556c581a..33815f4fb451 100644 --- a/net/netfilter/ipvs/ip_vs_sh.c +++ b/net/netfilter/ipvs/ip_vs_sh.c | |||
@@ -147,10 +147,9 @@ static int ip_vs_sh_init_svc(struct ip_vs_service *svc) | |||
147 | /* allocate the SH table for this service */ | 147 | /* allocate the SH table for this service */ |
148 | tbl = kmalloc(sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE, | 148 | tbl = kmalloc(sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE, |
149 | GFP_ATOMIC); | 149 | GFP_ATOMIC); |
150 | if (tbl == NULL) { | 150 | if (tbl == NULL) |
151 | pr_err("%s(): no memory\n", __func__); | ||
152 | return -ENOMEM; | 151 | return -ENOMEM; |
153 | } | 152 | |
154 | svc->sched_data = tbl; | 153 | svc->sched_data = tbl; |
155 | IP_VS_DBG(6, "SH hash table (memory=%Zdbytes) allocated for " | 154 | IP_VS_DBG(6, "SH hash table (memory=%Zdbytes) allocated for " |
156 | "current service\n", | 155 | "current service\n", |
diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c index 1ef41f50723c..fd0d4e09876a 100644 --- a/net/netfilter/ipvs/ip_vs_wrr.c +++ b/net/netfilter/ipvs/ip_vs_wrr.c | |||
@@ -85,10 +85,9 @@ static int ip_vs_wrr_init_svc(struct ip_vs_service *svc) | |||
85 | * Allocate the mark variable for WRR scheduling | 85 | * Allocate the mark variable for WRR scheduling |
86 | */ | 86 | */ |
87 | mark = kmalloc(sizeof(struct ip_vs_wrr_mark), GFP_ATOMIC); | 87 | mark = kmalloc(sizeof(struct ip_vs_wrr_mark), GFP_ATOMIC); |
88 | if (mark == NULL) { | 88 | if (mark == NULL) |
89 | pr_err("%s(): no memory\n", __func__); | ||
90 | return -ENOMEM; | 89 | return -ENOMEM; |
91 | } | 90 | |
92 | mark->cl = &svc->destinations; | 91 | mark->cl = &svc->destinations; |
93 | mark->cw = 0; | 92 | mark->cw = 0; |
94 | mark->mw = ip_vs_wrr_max_weight(svc); | 93 | mark->mw = ip_vs_wrr_max_weight(svc); |
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c index ee319a4338b0..aa2d7206ee8a 100644 --- a/net/netfilter/ipvs/ip_vs_xmit.c +++ b/net/netfilter/ipvs/ip_vs_xmit.c | |||
@@ -339,7 +339,7 @@ ip_vs_dst_reset(struct ip_vs_dest *dest) | |||
339 | \ | 339 | \ |
340 | (skb)->ipvs_property = 1; \ | 340 | (skb)->ipvs_property = 1; \ |
341 | if (unlikely((cp)->flags & IP_VS_CONN_F_NFCT)) \ | 341 | if (unlikely((cp)->flags & IP_VS_CONN_F_NFCT)) \ |
342 | __ret = ip_vs_confirm_conntrack(skb, cp); \ | 342 | __ret = ip_vs_confirm_conntrack(skb); \ |
343 | if (__ret == NF_ACCEPT) { \ | 343 | if (__ret == NF_ACCEPT) { \ |
344 | nf_reset(skb); \ | 344 | nf_reset(skb); \ |
345 | skb_forward_csum(skb); \ | 345 | skb_forward_csum(skb); \ |
diff --git a/net/netfilter/nf_conntrack_acct.c b/net/netfilter/nf_conntrack_acct.c index 5178c691ecbf..369df3f08d42 100644 --- a/net/netfilter/nf_conntrack_acct.c +++ b/net/netfilter/nf_conntrack_acct.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/export.h> | ||
15 | 16 | ||
16 | #include <net/netfilter/nf_conntrack.h> | 17 | #include <net/netfilter/nf_conntrack.h> |
17 | #include <net/netfilter/nf_conntrack_extend.h> | 18 | #include <net/netfilter/nf_conntrack_extend.h> |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 5acfaf59a9c3..7202b0631cd6 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -661,7 +661,6 @@ __nf_conntrack_alloc(struct net *net, u16 zone, | |||
661 | */ | 661 | */ |
662 | ct = kmem_cache_alloc(net->ct.nf_conntrack_cachep, gfp); | 662 | ct = kmem_cache_alloc(net->ct.nf_conntrack_cachep, gfp); |
663 | if (ct == NULL) { | 663 | if (ct == NULL) { |
664 | pr_debug("nf_conntrack_alloc: Can't alloc conntrack.\n"); | ||
665 | atomic_dec(&net->ct.count); | 664 | atomic_dec(&net->ct.count); |
666 | return ERR_PTR(-ENOMEM); | 665 | return ERR_PTR(-ENOMEM); |
667 | } | 666 | } |
@@ -749,10 +748,8 @@ init_conntrack(struct net *net, struct nf_conn *tmpl, | |||
749 | 748 | ||
750 | ct = __nf_conntrack_alloc(net, zone, tuple, &repl_tuple, GFP_ATOMIC, | 749 | ct = __nf_conntrack_alloc(net, zone, tuple, &repl_tuple, GFP_ATOMIC, |
751 | hash); | 750 | hash); |
752 | if (IS_ERR(ct)) { | 751 | if (IS_ERR(ct)) |
753 | pr_debug("Can't allocate conntrack.\n"); | ||
754 | return (struct nf_conntrack_tuple_hash *)ct; | 752 | return (struct nf_conntrack_tuple_hash *)ct; |
755 | } | ||
756 | 753 | ||
757 | if (!l4proto->new(ct, skb, dataoff)) { | 754 | if (!l4proto->new(ct, skb, dataoff)) { |
758 | nf_conntrack_free(ct); | 755 | nf_conntrack_free(ct); |
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c index 3add99439059..6b368be937c6 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/netdevice.h> | 20 | #include <linux/netdevice.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/export.h> | ||
22 | 23 | ||
23 | #include <net/netfilter/nf_conntrack.h> | 24 | #include <net/netfilter/nf_conntrack.h> |
24 | #include <net/netfilter/nf_conntrack_core.h> | 25 | #include <net/netfilter/nf_conntrack_core.h> |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index cd1e8e0970f2..340c80d968d4 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/percpu.h> | 20 | #include <linux/percpu.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/jhash.h> | 22 | #include <linux/jhash.h> |
23 | #include <linux/moduleparam.h> | ||
24 | #include <linux/export.h> | ||
23 | #include <net/net_namespace.h> | 25 | #include <net/net_namespace.h> |
24 | 26 | ||
25 | #include <net/netfilter/nf_conntrack.h> | 27 | #include <net/netfilter/nf_conntrack.h> |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 2d8158acf6fa..66b2c54c544f 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -307,17 +307,14 @@ nfulnl_alloc_skb(unsigned int inst_size, unsigned int pkt_size) | |||
307 | n = max(inst_size, pkt_size); | 307 | n = max(inst_size, pkt_size); |
308 | skb = alloc_skb(n, GFP_ATOMIC); | 308 | skb = alloc_skb(n, GFP_ATOMIC); |
309 | if (!skb) { | 309 | if (!skb) { |
310 | pr_notice("nfnetlink_log: can't alloc whole buffer (%u bytes)\n", | ||
311 | inst_size); | ||
312 | |||
313 | if (n > pkt_size) { | 310 | if (n > pkt_size) { |
314 | /* try to allocate only as much as we need for current | 311 | /* try to allocate only as much as we need for current |
315 | * packet */ | 312 | * packet */ |
316 | 313 | ||
317 | skb = alloc_skb(pkt_size, GFP_ATOMIC); | 314 | skb = alloc_skb(pkt_size, GFP_ATOMIC); |
318 | if (!skb) | 315 | if (!skb) |
319 | pr_err("nfnetlink_log: can't even alloc %u " | 316 | pr_err("nfnetlink_log: can't even alloc %u bytes\n", |
320 | "bytes\n", pkt_size); | 317 | pkt_size); |
321 | } | 318 | } |
322 | } | 319 | } |
323 | 320 | ||
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 71441b934ffd..8d987c3573fd 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | ||
17 | #include <linux/socket.h> | 18 | #include <linux/socket.h> |
18 | #include <linux/net.h> | 19 | #include <linux/net.h> |
19 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 3bdd443aaf15..f407ebc13481 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c | |||
@@ -122,14 +122,12 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) | |||
122 | 122 | ||
123 | info->timer = kmalloc(sizeof(*info->timer), GFP_KERNEL); | 123 | info->timer = kmalloc(sizeof(*info->timer), GFP_KERNEL); |
124 | if (!info->timer) { | 124 | if (!info->timer) { |
125 | pr_debug("couldn't alloc timer\n"); | ||
126 | ret = -ENOMEM; | 125 | ret = -ENOMEM; |
127 | goto out; | 126 | goto out; |
128 | } | 127 | } |
129 | 128 | ||
130 | info->timer->attr.attr.name = kstrdup(info->label, GFP_KERNEL); | 129 | info->timer->attr.attr.name = kstrdup(info->label, GFP_KERNEL); |
131 | if (!info->timer->attr.attr.name) { | 130 | if (!info->timer->attr.attr.name) { |
132 | pr_debug("couldn't alloc attribute name\n"); | ||
133 | ret = -ENOMEM; | 131 | ret = -ENOMEM; |
134 | goto out_free_timer; | 132 | goto out_free_timer; |
135 | } | 133 | } |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 9228ee0dc11a..dfd52bad1523 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -176,10 +176,7 @@ dsthash_alloc_init(struct xt_hashlimit_htable *ht, | |||
176 | ent = NULL; | 176 | ent = NULL; |
177 | } else | 177 | } else |
178 | ent = kmem_cache_alloc(hashlimit_cachep, GFP_ATOMIC); | 178 | ent = kmem_cache_alloc(hashlimit_cachep, GFP_ATOMIC); |
179 | if (!ent) { | 179 | if (ent) { |
180 | if (net_ratelimit()) | ||
181 | pr_err("cannot allocate dsthash_ent\n"); | ||
182 | } else { | ||
183 | memcpy(&ent->dst, dst, sizeof(ent->dst)); | 180 | memcpy(&ent->dst, dst, sizeof(ent->dst)); |
184 | spin_lock_init(&ent->lock); | 181 | spin_lock_init(&ent->lock); |
185 | 182 | ||
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c index 70eb2b4984dd..44c8eb4c9d66 100644 --- a/net/netfilter/xt_quota.c +++ b/net/netfilter/xt_quota.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/netfilter/x_tables.h> | 10 | #include <linux/netfilter/x_tables.h> |
11 | #include <linux/netfilter/xt_quota.h> | 11 | #include <linux/netfilter/xt_quota.h> |
12 | #include <linux/module.h> | ||
12 | 13 | ||
13 | struct xt_quota_priv { | 14 | struct xt_quota_priv { |
14 | spinlock_t lock; | 15 | spinlock_t lock; |
diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c index 42ecb71d445f..4fe4fb4276d0 100644 --- a/net/netfilter/xt_statistic.c +++ b/net/netfilter/xt_statistic.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/netfilter/xt_statistic.h> | 17 | #include <linux/netfilter/xt_statistic.h> |
18 | #include <linux/netfilter/x_tables.h> | 18 | #include <linux/netfilter/x_tables.h> |
19 | #include <linux/module.h> | ||
19 | 20 | ||
20 | struct xt_statistic_priv { | 21 | struct xt_statistic_priv { |
21 | atomic_t count; | 22 | atomic_t count; |
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index cd5ddb2ebc43..915a87ba23e1 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
38 | #include <net/netrom.h> | 38 | #include <net/netrom.h> |
39 | #include <linux/seq_file.h> | 39 | #include <linux/seq_file.h> |
40 | #include <linux/export.h> | ||
40 | 41 | ||
41 | static unsigned int nr_neigh_no = 1; | 42 | static unsigned int nr_neigh_no = 1; |
42 | 43 | ||
diff --git a/net/nfc/af_nfc.c b/net/nfc/af_nfc.c index e982cef8f49d..da67756425ce 100644 --- a/net/nfc/af_nfc.c +++ b/net/nfc/af_nfc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/nfc.h> | 24 | #include <linux/nfc.h> |
25 | #include <linux/module.h> | ||
25 | 26 | ||
26 | #include "nfc.h" | 27 | #include "nfc.h" |
27 | 28 | ||
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 3dffcb3221cc..fe5ca89abfce 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/workqueue.h> | 29 | #include <linux/workqueue.h> |
30 | #include <linux/completion.h> | 30 | #include <linux/completion.h> |
31 | #include <linux/export.h> | ||
31 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
32 | #include <linux/bitops.h> | 33 | #include <linux/bitops.h> |
33 | #include <linux/skbuff.h> | 34 | #include <linux/skbuff.h> |
diff --git a/net/nfc/nfc.h b/net/nfc/nfc.h index b6753f45624e..d86583f4831d 100644 --- a/net/nfc/nfc.h +++ b/net/nfc/nfc.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <net/nfc/nfc.h> | 27 | #include <net/nfc/nfc.h> |
28 | #include <net/sock.h> | 28 | #include <net/sock.h> |
29 | 29 | ||
30 | __attribute__((format (printf, 2, 3))) | 30 | __printf(2, 3) |
31 | int nfc_printk(const char *level, const char *fmt, ...); | 31 | int nfc_printk(const char *level, const char *fmt, ...); |
32 | 32 | ||
33 | #define nfc_info(fmt, arg...) nfc_printk(KERN_INFO, fmt, ##arg) | 33 | #define nfc_info(fmt, arg...) nfc_printk(KERN_INFO, fmt, ##arg) |
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c index 9fd652a51424..ee7b2b365ef2 100644 --- a/net/nfc/rawsock.c +++ b/net/nfc/rawsock.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <net/tcp_states.h> | 24 | #include <net/tcp_states.h> |
25 | #include <linux/nfc.h> | 25 | #include <linux/nfc.h> |
26 | #include <linux/export.h> | ||
26 | 27 | ||
27 | #include "nfc.h" | 28 | #include "nfc.h" |
28 | 29 | ||
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 03bb45adf2fc..82a6f34d39d0 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -335,7 +335,7 @@ struct packet_skb_cb { | |||
335 | (((x)->kactive_blk_num < ((x)->knum_blocks-1)) ? \ | 335 | (((x)->kactive_blk_num < ((x)->knum_blocks-1)) ? \ |
336 | ((x)->kactive_blk_num+1) : 0) | 336 | ((x)->kactive_blk_num+1) : 0) |
337 | 337 | ||
338 | static inline struct packet_sock *pkt_sk(struct sock *sk) | 338 | static struct packet_sock *pkt_sk(struct sock *sk) |
339 | { | 339 | { |
340 | return (struct packet_sock *)sk; | 340 | return (struct packet_sock *)sk; |
341 | } | 341 | } |
@@ -477,7 +477,7 @@ static void *packet_lookup_frame(struct packet_sock *po, | |||
477 | return h.raw; | 477 | return h.raw; |
478 | } | 478 | } |
479 | 479 | ||
480 | static inline void *packet_current_frame(struct packet_sock *po, | 480 | static void *packet_current_frame(struct packet_sock *po, |
481 | struct packet_ring_buffer *rb, | 481 | struct packet_ring_buffer *rb, |
482 | int status) | 482 | int status) |
483 | { | 483 | { |
@@ -715,7 +715,7 @@ out: | |||
715 | spin_unlock(&po->sk.sk_receive_queue.lock); | 715 | spin_unlock(&po->sk.sk_receive_queue.lock); |
716 | } | 716 | } |
717 | 717 | ||
718 | static inline void prb_flush_block(struct tpacket_kbdq_core *pkc1, | 718 | static void prb_flush_block(struct tpacket_kbdq_core *pkc1, |
719 | struct tpacket_block_desc *pbd1, __u32 status) | 719 | struct tpacket_block_desc *pbd1, __u32 status) |
720 | { | 720 | { |
721 | /* Flush everything minus the block header */ | 721 | /* Flush everything minus the block header */ |
@@ -793,7 +793,7 @@ static void prb_close_block(struct tpacket_kbdq_core *pkc1, | |||
793 | pkc1->kactive_blk_num = GET_NEXT_PRB_BLK_NUM(pkc1); | 793 | pkc1->kactive_blk_num = GET_NEXT_PRB_BLK_NUM(pkc1); |
794 | } | 794 | } |
795 | 795 | ||
796 | static inline void prb_thaw_queue(struct tpacket_kbdq_core *pkc) | 796 | static void prb_thaw_queue(struct tpacket_kbdq_core *pkc) |
797 | { | 797 | { |
798 | pkc->reset_pending_on_curr_blk = 0; | 798 | pkc->reset_pending_on_curr_blk = 0; |
799 | } | 799 | } |
@@ -869,7 +869,7 @@ static void prb_open_block(struct tpacket_kbdq_core *pkc1, | |||
869 | * case and __packet_lookup_frame_in_block will check if block-0 | 869 | * case and __packet_lookup_frame_in_block will check if block-0 |
870 | * is free and can now be re-used. | 870 | * is free and can now be re-used. |
871 | */ | 871 | */ |
872 | static inline void prb_freeze_queue(struct tpacket_kbdq_core *pkc, | 872 | static void prb_freeze_queue(struct tpacket_kbdq_core *pkc, |
873 | struct packet_sock *po) | 873 | struct packet_sock *po) |
874 | { | 874 | { |
875 | pkc->reset_pending_on_curr_blk = 1; | 875 | pkc->reset_pending_on_curr_blk = 1; |
@@ -940,36 +940,36 @@ static void prb_retire_current_block(struct tpacket_kbdq_core *pkc, | |||
940 | BUG(); | 940 | BUG(); |
941 | } | 941 | } |
942 | 942 | ||
943 | static inline int prb_curr_blk_in_use(struct tpacket_kbdq_core *pkc, | 943 | static int prb_curr_blk_in_use(struct tpacket_kbdq_core *pkc, |
944 | struct tpacket_block_desc *pbd) | 944 | struct tpacket_block_desc *pbd) |
945 | { | 945 | { |
946 | return TP_STATUS_USER & BLOCK_STATUS(pbd); | 946 | return TP_STATUS_USER & BLOCK_STATUS(pbd); |
947 | } | 947 | } |
948 | 948 | ||
949 | static inline int prb_queue_frozen(struct tpacket_kbdq_core *pkc) | 949 | static int prb_queue_frozen(struct tpacket_kbdq_core *pkc) |
950 | { | 950 | { |
951 | return pkc->reset_pending_on_curr_blk; | 951 | return pkc->reset_pending_on_curr_blk; |
952 | } | 952 | } |
953 | 953 | ||
954 | static inline void prb_clear_blk_fill_status(struct packet_ring_buffer *rb) | 954 | static void prb_clear_blk_fill_status(struct packet_ring_buffer *rb) |
955 | { | 955 | { |
956 | struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(rb); | 956 | struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(rb); |
957 | atomic_dec(&pkc->blk_fill_in_prog); | 957 | atomic_dec(&pkc->blk_fill_in_prog); |
958 | } | 958 | } |
959 | 959 | ||
960 | static inline void prb_fill_rxhash(struct tpacket_kbdq_core *pkc, | 960 | static void prb_fill_rxhash(struct tpacket_kbdq_core *pkc, |
961 | struct tpacket3_hdr *ppd) | 961 | struct tpacket3_hdr *ppd) |
962 | { | 962 | { |
963 | ppd->hv1.tp_rxhash = skb_get_rxhash(pkc->skb); | 963 | ppd->hv1.tp_rxhash = skb_get_rxhash(pkc->skb); |
964 | } | 964 | } |
965 | 965 | ||
966 | static inline void prb_clear_rxhash(struct tpacket_kbdq_core *pkc, | 966 | static void prb_clear_rxhash(struct tpacket_kbdq_core *pkc, |
967 | struct tpacket3_hdr *ppd) | 967 | struct tpacket3_hdr *ppd) |
968 | { | 968 | { |
969 | ppd->hv1.tp_rxhash = 0; | 969 | ppd->hv1.tp_rxhash = 0; |
970 | } | 970 | } |
971 | 971 | ||
972 | static inline void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc, | 972 | static void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc, |
973 | struct tpacket3_hdr *ppd) | 973 | struct tpacket3_hdr *ppd) |
974 | { | 974 | { |
975 | if (vlan_tx_tag_present(pkc->skb)) { | 975 | if (vlan_tx_tag_present(pkc->skb)) { |
@@ -991,7 +991,7 @@ static void prb_run_all_ft_ops(struct tpacket_kbdq_core *pkc, | |||
991 | prb_clear_rxhash(pkc, ppd); | 991 | prb_clear_rxhash(pkc, ppd); |
992 | } | 992 | } |
993 | 993 | ||
994 | static inline void prb_fill_curr_block(char *curr, | 994 | static void prb_fill_curr_block(char *curr, |
995 | struct tpacket_kbdq_core *pkc, | 995 | struct tpacket_kbdq_core *pkc, |
996 | struct tpacket_block_desc *pbd, | 996 | struct tpacket_block_desc *pbd, |
997 | unsigned int len) | 997 | unsigned int len) |
@@ -1071,7 +1071,7 @@ static void *__packet_lookup_frame_in_block(struct packet_sock *po, | |||
1071 | return NULL; | 1071 | return NULL; |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | static inline void *packet_current_rx_frame(struct packet_sock *po, | 1074 | static void *packet_current_rx_frame(struct packet_sock *po, |
1075 | struct sk_buff *skb, | 1075 | struct sk_buff *skb, |
1076 | int status, unsigned int len) | 1076 | int status, unsigned int len) |
1077 | { | 1077 | { |
@@ -1091,7 +1091,7 @@ static inline void *packet_current_rx_frame(struct packet_sock *po, | |||
1091 | } | 1091 | } |
1092 | } | 1092 | } |
1093 | 1093 | ||
1094 | static inline void *prb_lookup_block(struct packet_sock *po, | 1094 | static void *prb_lookup_block(struct packet_sock *po, |
1095 | struct packet_ring_buffer *rb, | 1095 | struct packet_ring_buffer *rb, |
1096 | unsigned int previous, | 1096 | unsigned int previous, |
1097 | int status) | 1097 | int status) |
@@ -1104,7 +1104,7 @@ static inline void *prb_lookup_block(struct packet_sock *po, | |||
1104 | return pbd; | 1104 | return pbd; |
1105 | } | 1105 | } |
1106 | 1106 | ||
1107 | static inline int prb_previous_blk_num(struct packet_ring_buffer *rb) | 1107 | static int prb_previous_blk_num(struct packet_ring_buffer *rb) |
1108 | { | 1108 | { |
1109 | unsigned int prev; | 1109 | unsigned int prev; |
1110 | if (rb->prb_bdqc.kactive_blk_num) | 1110 | if (rb->prb_bdqc.kactive_blk_num) |
@@ -1115,7 +1115,7 @@ static inline int prb_previous_blk_num(struct packet_ring_buffer *rb) | |||
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | /* Assumes caller has held the rx_queue.lock */ | 1117 | /* Assumes caller has held the rx_queue.lock */ |
1118 | static inline void *__prb_previous_block(struct packet_sock *po, | 1118 | static void *__prb_previous_block(struct packet_sock *po, |
1119 | struct packet_ring_buffer *rb, | 1119 | struct packet_ring_buffer *rb, |
1120 | int status) | 1120 | int status) |
1121 | { | 1121 | { |
@@ -1123,7 +1123,7 @@ static inline void *__prb_previous_block(struct packet_sock *po, | |||
1123 | return prb_lookup_block(po, rb, previous, status); | 1123 | return prb_lookup_block(po, rb, previous, status); |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | static inline void *packet_previous_rx_frame(struct packet_sock *po, | 1126 | static void *packet_previous_rx_frame(struct packet_sock *po, |
1127 | struct packet_ring_buffer *rb, | 1127 | struct packet_ring_buffer *rb, |
1128 | int status) | 1128 | int status) |
1129 | { | 1129 | { |
@@ -1133,7 +1133,7 @@ static inline void *packet_previous_rx_frame(struct packet_sock *po, | |||
1133 | return __prb_previous_block(po, rb, status); | 1133 | return __prb_previous_block(po, rb, status); |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | static inline void packet_increment_rx_head(struct packet_sock *po, | 1136 | static void packet_increment_rx_head(struct packet_sock *po, |
1137 | struct packet_ring_buffer *rb) | 1137 | struct packet_ring_buffer *rb) |
1138 | { | 1138 | { |
1139 | switch (po->tp_version) { | 1139 | switch (po->tp_version) { |
@@ -1148,7 +1148,7 @@ static inline void packet_increment_rx_head(struct packet_sock *po, | |||
1148 | } | 1148 | } |
1149 | } | 1149 | } |
1150 | 1150 | ||
1151 | static inline void *packet_previous_frame(struct packet_sock *po, | 1151 | static void *packet_previous_frame(struct packet_sock *po, |
1152 | struct packet_ring_buffer *rb, | 1152 | struct packet_ring_buffer *rb, |
1153 | int status) | 1153 | int status) |
1154 | { | 1154 | { |
@@ -1156,7 +1156,7 @@ static inline void *packet_previous_frame(struct packet_sock *po, | |||
1156 | return packet_lookup_frame(po, rb, previous, status); | 1156 | return packet_lookup_frame(po, rb, previous, status); |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | static inline void packet_increment_head(struct packet_ring_buffer *buff) | 1159 | static void packet_increment_head(struct packet_ring_buffer *buff) |
1160 | { | 1160 | { |
1161 | buff->head = buff->head != buff->frame_max ? buff->head+1 : 0; | 1161 | buff->head = buff->head != buff->frame_max ? buff->head+1 : 0; |
1162 | } | 1162 | } |
@@ -1558,7 +1558,7 @@ out_free: | |||
1558 | return err; | 1558 | return err; |
1559 | } | 1559 | } |
1560 | 1560 | ||
1561 | static inline unsigned int run_filter(const struct sk_buff *skb, | 1561 | static unsigned int run_filter(const struct sk_buff *skb, |
1562 | const struct sock *sk, | 1562 | const struct sock *sk, |
1563 | unsigned int res) | 1563 | unsigned int res) |
1564 | { | 1564 | { |
@@ -2167,10 +2167,10 @@ out: | |||
2167 | return err; | 2167 | return err; |
2168 | } | 2168 | } |
2169 | 2169 | ||
2170 | static inline struct sk_buff *packet_alloc_skb(struct sock *sk, size_t prepad, | 2170 | static struct sk_buff *packet_alloc_skb(struct sock *sk, size_t prepad, |
2171 | size_t reserve, size_t len, | 2171 | size_t reserve, size_t len, |
2172 | size_t linear, int noblock, | 2172 | size_t linear, int noblock, |
2173 | int *err) | 2173 | int *err) |
2174 | { | 2174 | { |
2175 | struct sk_buff *skb; | 2175 | struct sk_buff *skb; |
2176 | 2176 | ||
@@ -3494,7 +3494,7 @@ static void free_pg_vec(struct pgv *pg_vec, unsigned int order, | |||
3494 | kfree(pg_vec); | 3494 | kfree(pg_vec); |
3495 | } | 3495 | } |
3496 | 3496 | ||
3497 | static inline char *alloc_one_pg_vec_page(unsigned long order) | 3497 | static char *alloc_one_pg_vec_page(unsigned long order) |
3498 | { | 3498 | { |
3499 | char *buffer = NULL; | 3499 | char *buffer = NULL; |
3500 | gfp_t gfp_flags = GFP_KERNEL | __GFP_COMP | | 3500 | gfp_t gfp_flags = GFP_KERNEL | __GFP_COMP | |
diff --git a/net/phonet/datagram.c b/net/phonet/datagram.c index 2f032381bd45..bf35b4e1a14c 100644 --- a/net/phonet/datagram.c +++ b/net/phonet/datagram.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <net/sock.h> | 30 | #include <net/sock.h> |
31 | 31 | ||
32 | #include <linux/phonet.h> | 32 | #include <linux/phonet.h> |
33 | #include <linux/export.h> | ||
33 | #include <net/phonet/phonet.h> | 34 | #include <net/phonet/phonet.h> |
34 | 35 | ||
35 | static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb); | 36 | static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb); |
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index f17fd841f948..2ba6e9fb4cbc 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/ioctls.h> | 30 | #include <asm/ioctls.h> |
31 | 31 | ||
32 | #include <linux/phonet.h> | 32 | #include <linux/phonet.h> |
33 | #include <linux/module.h> | ||
33 | #include <net/phonet/phonet.h> | 34 | #include <net/phonet/phonet.h> |
34 | #include <net/phonet/pep.h> | 35 | #include <net/phonet/pep.h> |
35 | #include <net/phonet/gprs.h> | 36 | #include <net/phonet/gprs.h> |
diff --git a/net/phonet/socket.c b/net/phonet/socket.c index 676d18dc75b7..3f8d0b1603b9 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <net/tcp_states.h> | 31 | #include <net/tcp_states.h> |
32 | 32 | ||
33 | #include <linux/phonet.h> | 33 | #include <linux/phonet.h> |
34 | #include <linux/export.h> | ||
34 | #include <net/phonet/phonet.h> | 35 | #include <net/phonet/phonet.h> |
35 | #include <net/phonet/pep.h> | 36 | #include <net/phonet/pep.h> |
36 | #include <net/phonet/pn_dev.h> | 37 | #include <net/phonet/pn_dev.h> |
diff --git a/net/rds/cong.c b/net/rds/cong.c index 6daaa49d133f..e5b65acd650b 100644 --- a/net/rds/cong.c +++ b/net/rds/cong.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
35 | #include <linux/rbtree.h> | 35 | #include <linux/rbtree.h> |
36 | #include <linux/bitops.h> | 36 | #include <linux/bitops.h> |
37 | #include <linux/export.h> | ||
37 | 38 | ||
38 | #include "rds.h" | 39 | #include "rds.h" |
39 | 40 | ||
diff --git a/net/rds/connection.c b/net/rds/connection.c index 9334d892366e..9e07c756d1f9 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/list.h> | 34 | #include <linux/list.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | #include <linux/export.h> | ||
36 | #include <net/inet_hashtables.h> | 37 | #include <net/inet_hashtables.h> |
37 | 38 | ||
38 | #include "rds.h" | 39 | #include "rds.h" |
diff --git a/net/rds/ib.c b/net/rds/ib.c index 3b83086bcc30..b4c8b0022fee 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/if_arp.h> | 38 | #include <linux/if_arp.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | #include <linux/module.h> | ||
41 | 42 | ||
42 | #include "rds.h" | 43 | #include "rds.h" |
43 | #include "ib.h" | 44 | #include "ib.h" |
diff --git a/net/rds/info.c b/net/rds/info.c index 4fdf1b6e84ff..f1c016c4146e 100644 --- a/net/rds/info.c +++ b/net/rds/info.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
37 | #include <linux/export.h> | ||
37 | 38 | ||
38 | #include "rds.h" | 39 | #include "rds.h" |
39 | 40 | ||
diff --git a/net/rds/iw.c b/net/rds/iw.c index f7474844f096..7826d46baa70 100644 --- a/net/rds/iw.c +++ b/net/rds/iw.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/if_arp.h> | 38 | #include <linux/if_arp.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | #include <linux/module.h> | ||
41 | 42 | ||
42 | #include "rds.h" | 43 | #include "rds.h" |
43 | #include "iw.h" | 44 | #include "iw.h" |
diff --git a/net/rds/message.c b/net/rds/message.c index 1fd3d29023d7..f0a4658f3273 100644 --- a/net/rds/message.c +++ b/net/rds/message.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/export.h> | ||
35 | 36 | ||
36 | #include "rds.h" | 37 | #include "rds.h" |
37 | 38 | ||
diff --git a/net/rds/page.c b/net/rds/page.c index b82d63e77b03..2499cd108421 100644 --- a/net/rds/page.c +++ b/net/rds/page.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/highmem.h> | 33 | #include <linux/highmem.h> |
34 | #include <linux/gfp.h> | 34 | #include <linux/gfp.h> |
35 | #include <linux/cpu.h> | 35 | #include <linux/cpu.h> |
36 | #include <linux/export.h> | ||
36 | 37 | ||
37 | #include "rds.h" | 38 | #include "rds.h" |
38 | 39 | ||
diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c index f8760e1b6688..c2be901d19ee 100644 --- a/net/rds/rdma_transport.c +++ b/net/rds/rdma_transport.c | |||
@@ -30,6 +30,7 @@ | |||
30 | * SOFTWARE. | 30 | * SOFTWARE. |
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/module.h> | ||
33 | #include <rdma/rdma_cm.h> | 34 | #include <rdma/rdma_cm.h> |
34 | 35 | ||
35 | #include "rdma_transport.h" | 36 | #include "rdma_transport.h" |
diff --git a/net/rds/rds.h b/net/rds/rds.h index da8adac2bf06..7eaba1831f0d 100644 --- a/net/rds/rds.h +++ b/net/rds/rds.h | |||
@@ -36,8 +36,8 @@ | |||
36 | #define rdsdebug(fmt, args...) pr_debug("%s(): " fmt, __func__ , ##args) | 36 | #define rdsdebug(fmt, args...) pr_debug("%s(): " fmt, __func__ , ##args) |
37 | #else | 37 | #else |
38 | /* sigh, pr_debug() causes unused variable warnings */ | 38 | /* sigh, pr_debug() causes unused variable warnings */ |
39 | static inline void __attribute__ ((format (printf, 1, 2))) | 39 | static inline __printf(1, 2) |
40 | rdsdebug(char *fmt, ...) | 40 | void rdsdebug(char *fmt, ...) |
41 | { | 41 | { |
42 | } | 42 | } |
43 | #endif | 43 | #endif |
@@ -625,8 +625,8 @@ void rds_for_each_conn_info(struct socket *sock, unsigned int len, | |||
625 | struct rds_info_lengths *lens, | 625 | struct rds_info_lengths *lens, |
626 | int (*visitor)(struct rds_connection *, void *), | 626 | int (*visitor)(struct rds_connection *, void *), |
627 | size_t item_len); | 627 | size_t item_len); |
628 | void __rds_conn_error(struct rds_connection *conn, const char *, ...) | 628 | __printf(2, 3) |
629 | __attribute__ ((format (printf, 2, 3))); | 629 | void __rds_conn_error(struct rds_connection *conn, const char *, ...); |
630 | #define rds_conn_error(conn, fmt...) \ | 630 | #define rds_conn_error(conn, fmt...) \ |
631 | __rds_conn_error(conn, KERN_WARNING "RDS: " fmt) | 631 | __rds_conn_error(conn, KERN_WARNING "RDS: " fmt) |
632 | 632 | ||
diff --git a/net/rds/recv.c b/net/rds/recv.c index 596689e59272..bc3f8cd6d070 100644 --- a/net/rds/recv.c +++ b/net/rds/recv.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <net/sock.h> | 35 | #include <net/sock.h> |
36 | #include <linux/in.h> | 36 | #include <linux/in.h> |
37 | #include <linux/export.h> | ||
37 | 38 | ||
38 | #include "rds.h" | 39 | #include "rds.h" |
39 | 40 | ||
diff --git a/net/rds/send.c b/net/rds/send.c index aa57e22539ef..e2d63c59e7c2 100644 --- a/net/rds/send.c +++ b/net/rds/send.c | |||
@@ -31,11 +31,13 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/moduleparam.h> | ||
34 | #include <linux/gfp.h> | 35 | #include <linux/gfp.h> |
35 | #include <net/sock.h> | 36 | #include <net/sock.h> |
36 | #include <linux/in.h> | 37 | #include <linux/in.h> |
37 | #include <linux/list.h> | 38 | #include <linux/list.h> |
38 | #include <linux/ratelimit.h> | 39 | #include <linux/ratelimit.h> |
40 | #include <linux/export.h> | ||
39 | 41 | ||
40 | #include "rds.h" | 42 | #include "rds.h" |
41 | 43 | ||
diff --git a/net/rds/stats.c b/net/rds/stats.c index 10c759ccac0c..7be790d60b90 100644 --- a/net/rds/stats.c +++ b/net/rds/stats.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/percpu.h> | 33 | #include <linux/percpu.h> |
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/proc_fs.h> | 35 | #include <linux/proc_fs.h> |
36 | #include <linux/export.h> | ||
36 | 37 | ||
37 | #include "rds.h" | 38 | #include "rds.h" |
38 | 39 | ||
diff --git a/net/rds/tcp.c b/net/rds/tcp.c index 8e0a32001c90..edac9ef2bc8b 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/in.h> | 35 | #include <linux/in.h> |
36 | #include <linux/module.h> | ||
36 | #include <net/tcp.h> | 37 | #include <net/tcp.h> |
37 | 38 | ||
38 | #include "rds.h" | 39 | #include "rds.h" |
diff --git a/net/rds/threads.c b/net/rds/threads.c index 0fd90f8c5f59..65eaefcab241 100644 --- a/net/rds/threads.c +++ b/net/rds/threads.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/random.h> | 34 | #include <linux/random.h> |
35 | #include <linux/export.h> | ||
35 | 36 | ||
36 | #include "rds.h" | 37 | #include "rds.h" |
37 | 38 | ||
diff --git a/net/rfkill/input.c b/net/rfkill/input.c index 1bca6d49ec96..24c55c53e6a2 100644 --- a/net/rfkill/input.c +++ b/net/rfkill/input.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/moduleparam.h> | ||
18 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/rfkill.h> | 21 | #include <linux/rfkill.h> |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index d389de197089..cd9b7ee60f3e 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <net/rose.h> | 37 | #include <net/rose.h> |
38 | #include <linux/seq_file.h> | 38 | #include <linux/seq_file.h> |
39 | #include <linux/export.h> | ||
39 | 40 | ||
40 | static unsigned int rose_neigh_no = 1; | 41 | static unsigned int rose_neigh_no = 1; |
41 | 42 | ||
diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c index 5f22e263eda7..338d793c7113 100644 --- a/net/rxrpc/ar-output.c +++ b/net/rxrpc/ar-output.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/gfp.h> | 13 | #include <linux/gfp.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/circ_buf.h> | 15 | #include <linux/circ_buf.h> |
16 | #include <linux/export.h> | ||
16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
17 | #include <net/af_rxrpc.h> | 18 | #include <net/af_rxrpc.h> |
18 | #include "ar-internal.h" | 19 | #include "ar-internal.h" |
diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c index 0c65013e3bfe..4b48687c3890 100644 --- a/net/rxrpc/ar-recvmsg.c +++ b/net/rxrpc/ar-recvmsg.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/net.h> | 12 | #include <linux/net.h> |
13 | #include <linux/skbuff.h> | 13 | #include <linux/skbuff.h> |
14 | #include <linux/export.h> | ||
14 | #include <net/sock.h> | 15 | #include <net/sock.h> |
15 | #include <net/af_rxrpc.h> | 16 | #include <net/af_rxrpc.h> |
16 | #include "ar-internal.h" | 17 | #include "ar-internal.h" |
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index f2fb67e701a3..93fdf131bd75 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/kmod.h> | 21 | #include <linux/kmod.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/module.h> | ||
23 | #include <net/net_namespace.h> | 24 | #include <net/net_namespace.h> |
24 | #include <net/sock.h> | 25 | #include <net/sock.h> |
25 | #include <net/sch_generic.h> | 26 | #include <net/sch_generic.h> |
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 9e087d885675..7b582300d051 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/ipv6.h> | 21 | #include <linux/ipv6.h> |
22 | #include <linux/if_vlan.h> | 22 | #include <linux/if_vlan.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/module.h> | ||
24 | 25 | ||
25 | #include <net/pkt_cls.h> | 26 | #include <net/pkt_cls.h> |
26 | #include <net/ip.h> | 27 | #include <net/ip.h> |
diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c index ec5cbc848963..0a4b2f9a0094 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/export.h> | ||
14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
15 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
16 | #include <linux/skbuff.h> | 17 | #include <linux/skbuff.h> |
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c index ea17cbed29ef..f88256cbacbf 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/module.h> | ||
17 | #include <net/netlink.h> | 18 | #include <net/netlink.h> |
18 | #include <net/pkt_sched.h> | 19 | #include <net/pkt_sched.h> |
19 | #include <net/sch_generic.h> | 20 | #include <net/sch_generic.h> |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 05a6ce214714..1e2eee88c3ea 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
38 | #include <linux/seq_file.h> | 38 | #include <linux/seq_file.h> |
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/export.h> | ||
40 | #include <net/sctp/sctp.h> | 41 | #include <net/sctp/sctp.h> |
41 | #include <net/ip.h> /* for snmp_fold_field */ | 42 | #include <net/ip.h> /* for snmp_fold_field */ |
42 | 43 | ||
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 836aa63ee121..13bf5fcdbff1 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -78,6 +78,7 @@ | |||
78 | #include <net/inet_common.h> | 78 | #include <net/inet_common.h> |
79 | 79 | ||
80 | #include <linux/socket.h> /* for sa_family_t */ | 80 | #include <linux/socket.h> /* for sa_family_t */ |
81 | #include <linux/export.h> | ||
81 | #include <net/sock.h> | 82 | #include <net/sock.h> |
82 | #include <net/sctp/sctp.h> | 83 | #include <net/sctp/sctp.h> |
83 | #include <net/sctp/sm.h> | 84 | #include <net/sctp/sm.h> |
diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index 4548757c9871..67a655ee82a9 100644 --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <net/ipv6.h> | 19 | #include <net/ipv6.h> |
20 | #include <linux/sunrpc/clnt.h> | 20 | #include <linux/sunrpc/clnt.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/export.h> | ||
22 | 23 | ||
23 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 24 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
24 | 25 | ||
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index 4cb70dc6e7ad..e50502d8ceb7 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c | |||
@@ -129,6 +129,9 @@ unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags) | |||
129 | for (i = 0; i < groups ; i++) | 129 | for (i = 0; i < groups ; i++) |
130 | if (cred->uc_gids[i] != GROUP_AT(acred->group_info, i)) | 130 | if (cred->uc_gids[i] != GROUP_AT(acred->group_info, i)) |
131 | return 0; | 131 | return 0; |
132 | if (groups < NFS_NGROUPS && | ||
133 | cred->uc_gids[groups] != NOGROUP) | ||
134 | return 0; | ||
132 | return 1; | 135 | return 1; |
133 | } | 136 | } |
134 | 137 | ||
diff --git a/net/sunrpc/backchannel_rqst.c b/net/sunrpc/backchannel_rqst.c index 91eaa26e4c42..3ad435a14ada 100644 --- a/net/sunrpc/backchannel_rqst.c +++ b/net/sunrpc/backchannel_rqst.c | |||
@@ -24,6 +24,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
24 | #include <linux/tcp.h> | 24 | #include <linux/tcp.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/sunrpc/xprt.h> | 26 | #include <linux/sunrpc/xprt.h> |
27 | #include <linux/export.h> | ||
27 | 28 | ||
28 | #ifdef RPC_DEBUG | 29 | #ifdef RPC_DEBUG |
29 | #define RPCDBG_FACILITY RPCDBG_TRANS | 30 | #define RPCDBG_FACILITY RPCDBG_TRANS |
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index f588b852d41c..8761bf8e36fc 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c | |||
@@ -114,6 +114,9 @@ static struct rpc_program rpcb_program; | |||
114 | static struct rpc_clnt * rpcb_local_clnt; | 114 | static struct rpc_clnt * rpcb_local_clnt; |
115 | static struct rpc_clnt * rpcb_local_clnt4; | 115 | static struct rpc_clnt * rpcb_local_clnt4; |
116 | 116 | ||
117 | DEFINE_SPINLOCK(rpcb_clnt_lock); | ||
118 | unsigned int rpcb_users; | ||
119 | |||
117 | struct rpcbind_args { | 120 | struct rpcbind_args { |
118 | struct rpc_xprt * r_xprt; | 121 | struct rpc_xprt * r_xprt; |
119 | 122 | ||
@@ -161,6 +164,56 @@ static void rpcb_map_release(void *data) | |||
161 | kfree(map); | 164 | kfree(map); |
162 | } | 165 | } |
163 | 166 | ||
167 | static int rpcb_get_local(void) | ||
168 | { | ||
169 | int cnt; | ||
170 | |||
171 | spin_lock(&rpcb_clnt_lock); | ||
172 | if (rpcb_users) | ||
173 | rpcb_users++; | ||
174 | cnt = rpcb_users; | ||
175 | spin_unlock(&rpcb_clnt_lock); | ||
176 | |||
177 | return cnt; | ||
178 | } | ||
179 | |||
180 | void rpcb_put_local(void) | ||
181 | { | ||
182 | struct rpc_clnt *clnt = rpcb_local_clnt; | ||
183 | struct rpc_clnt *clnt4 = rpcb_local_clnt4; | ||
184 | int shutdown; | ||
185 | |||
186 | spin_lock(&rpcb_clnt_lock); | ||
187 | if (--rpcb_users == 0) { | ||
188 | rpcb_local_clnt = NULL; | ||
189 | rpcb_local_clnt4 = NULL; | ||
190 | } | ||
191 | shutdown = !rpcb_users; | ||
192 | spin_unlock(&rpcb_clnt_lock); | ||
193 | |||
194 | if (shutdown) { | ||
195 | /* | ||
196 | * cleanup_rpcb_clnt - remove xprtsock's sysctls, unregister | ||
197 | */ | ||
198 | if (clnt4) | ||
199 | rpc_shutdown_client(clnt4); | ||
200 | if (clnt) | ||
201 | rpc_shutdown_client(clnt); | ||
202 | } | ||
203 | } | ||
204 | |||
205 | static void rpcb_set_local(struct rpc_clnt *clnt, struct rpc_clnt *clnt4) | ||
206 | { | ||
207 | /* Protected by rpcb_create_local_mutex */ | ||
208 | rpcb_local_clnt = clnt; | ||
209 | rpcb_local_clnt4 = clnt4; | ||
210 | smp_wmb(); | ||
211 | rpcb_users = 1; | ||
212 | dprintk("RPC: created new rpcb local clients (rpcb_local_clnt: " | ||
213 | "%p, rpcb_local_clnt4: %p)\n", rpcb_local_clnt, | ||
214 | rpcb_local_clnt4); | ||
215 | } | ||
216 | |||
164 | /* | 217 | /* |
165 | * Returns zero on success, otherwise a negative errno value | 218 | * Returns zero on success, otherwise a negative errno value |
166 | * is returned. | 219 | * is returned. |
@@ -205,9 +258,7 @@ static int rpcb_create_local_unix(void) | |||
205 | clnt4 = NULL; | 258 | clnt4 = NULL; |
206 | } | 259 | } |
207 | 260 | ||
208 | /* Protected by rpcb_create_local_mutex */ | 261 | rpcb_set_local(clnt, clnt4); |
209 | rpcb_local_clnt = clnt; | ||
210 | rpcb_local_clnt4 = clnt4; | ||
211 | 262 | ||
212 | out: | 263 | out: |
213 | return result; | 264 | return result; |
@@ -259,9 +310,7 @@ static int rpcb_create_local_net(void) | |||
259 | clnt4 = NULL; | 310 | clnt4 = NULL; |
260 | } | 311 | } |
261 | 312 | ||
262 | /* Protected by rpcb_create_local_mutex */ | 313 | rpcb_set_local(clnt, clnt4); |
263 | rpcb_local_clnt = clnt; | ||
264 | rpcb_local_clnt4 = clnt4; | ||
265 | 314 | ||
266 | out: | 315 | out: |
267 | return result; | 316 | return result; |
@@ -271,16 +320,16 @@ out: | |||
271 | * Returns zero on success, otherwise a negative errno value | 320 | * Returns zero on success, otherwise a negative errno value |
272 | * is returned. | 321 | * is returned. |
273 | */ | 322 | */ |
274 | static int rpcb_create_local(void) | 323 | int rpcb_create_local(void) |
275 | { | 324 | { |
276 | static DEFINE_MUTEX(rpcb_create_local_mutex); | 325 | static DEFINE_MUTEX(rpcb_create_local_mutex); |
277 | int result = 0; | 326 | int result = 0; |
278 | 327 | ||
279 | if (rpcb_local_clnt) | 328 | if (rpcb_get_local()) |
280 | return result; | 329 | return result; |
281 | 330 | ||
282 | mutex_lock(&rpcb_create_local_mutex); | 331 | mutex_lock(&rpcb_create_local_mutex); |
283 | if (rpcb_local_clnt) | 332 | if (rpcb_get_local()) |
284 | goto out; | 333 | goto out; |
285 | 334 | ||
286 | if (rpcb_create_local_unix() != 0) | 335 | if (rpcb_create_local_unix() != 0) |
@@ -382,11 +431,6 @@ int rpcb_register(u32 prog, u32 vers, int prot, unsigned short port) | |||
382 | struct rpc_message msg = { | 431 | struct rpc_message msg = { |
383 | .rpc_argp = &map, | 432 | .rpc_argp = &map, |
384 | }; | 433 | }; |
385 | int error; | ||
386 | |||
387 | error = rpcb_create_local(); | ||
388 | if (error) | ||
389 | return error; | ||
390 | 434 | ||
391 | dprintk("RPC: %sregistering (%u, %u, %d, %u) with local " | 435 | dprintk("RPC: %sregistering (%u, %u, %d, %u) with local " |
392 | "rpcbind\n", (port ? "" : "un"), | 436 | "rpcbind\n", (port ? "" : "un"), |
@@ -522,11 +566,7 @@ int rpcb_v4_register(const u32 program, const u32 version, | |||
522 | struct rpc_message msg = { | 566 | struct rpc_message msg = { |
523 | .rpc_argp = &map, | 567 | .rpc_argp = &map, |
524 | }; | 568 | }; |
525 | int error; | ||
526 | 569 | ||
527 | error = rpcb_create_local(); | ||
528 | if (error) | ||
529 | return error; | ||
530 | if (rpcb_local_clnt4 == NULL) | 570 | if (rpcb_local_clnt4 == NULL) |
531 | return -EPROTONOSUPPORT; | 571 | return -EPROTONOSUPPORT; |
532 | 572 | ||
@@ -1060,15 +1100,3 @@ static struct rpc_program rpcb_program = { | |||
1060 | .version = rpcb_version, | 1100 | .version = rpcb_version, |
1061 | .stats = &rpcb_stats, | 1101 | .stats = &rpcb_stats, |
1062 | }; | 1102 | }; |
1063 | |||
1064 | /** | ||
1065 | * cleanup_rpcb_clnt - remove xprtsock's sysctls, unregister | ||
1066 | * | ||
1067 | */ | ||
1068 | void cleanup_rpcb_clnt(void) | ||
1069 | { | ||
1070 | if (rpcb_local_clnt4) | ||
1071 | rpc_shutdown_client(rpcb_local_clnt4); | ||
1072 | if (rpcb_local_clnt) | ||
1073 | rpc_shutdown_client(rpcb_local_clnt); | ||
1074 | } | ||
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c index 10b4319ebbca..145e6784f508 100644 --- a/net/sunrpc/socklib.c +++ b/net/sunrpc/socklib.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | #include <linux/udp.h> | 15 | #include <linux/udp.h> |
16 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
17 | #include <linux/export.h> | ||
17 | 18 | ||
18 | 19 | ||
19 | /** | 20 | /** |
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index 9d0809160994..8ec9778c3f4a 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c | |||
@@ -61,8 +61,6 @@ static struct pernet_operations sunrpc_net_ops = { | |||
61 | 61 | ||
62 | extern struct cache_detail unix_gid_cache; | 62 | extern struct cache_detail unix_gid_cache; |
63 | 63 | ||
64 | extern void cleanup_rpcb_clnt(void); | ||
65 | |||
66 | static int __init | 64 | static int __init |
67 | init_sunrpc(void) | 65 | init_sunrpc(void) |
68 | { | 66 | { |
@@ -102,7 +100,6 @@ out: | |||
102 | static void __exit | 100 | static void __exit |
103 | cleanup_sunrpc(void) | 101 | cleanup_sunrpc(void) |
104 | { | 102 | { |
105 | cleanup_rpcb_clnt(); | ||
106 | rpcauth_remove_module(); | 103 | rpcauth_remove_module(); |
107 | cleanup_socket_xprt(); | 104 | cleanup_socket_xprt(); |
108 | svc_cleanup_xprt_sock(); | 105 | svc_cleanup_xprt_sock(); |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 30d70abb4e2c..6e038884ae0c 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -366,6 +366,42 @@ svc_pool_for_cpu(struct svc_serv *serv, int cpu) | |||
366 | return &serv->sv_pools[pidx % serv->sv_nrpools]; | 366 | return &serv->sv_pools[pidx % serv->sv_nrpools]; |
367 | } | 367 | } |
368 | 368 | ||
369 | static int svc_rpcb_setup(struct svc_serv *serv) | ||
370 | { | ||
371 | int err; | ||
372 | |||
373 | err = rpcb_create_local(); | ||
374 | if (err) | ||
375 | return err; | ||
376 | |||
377 | /* Remove any stale portmap registrations */ | ||
378 | svc_unregister(serv); | ||
379 | return 0; | ||
380 | } | ||
381 | |||
382 | void svc_rpcb_cleanup(struct svc_serv *serv) | ||
383 | { | ||
384 | svc_unregister(serv); | ||
385 | rpcb_put_local(); | ||
386 | } | ||
387 | EXPORT_SYMBOL_GPL(svc_rpcb_cleanup); | ||
388 | |||
389 | static int svc_uses_rpcbind(struct svc_serv *serv) | ||
390 | { | ||
391 | struct svc_program *progp; | ||
392 | unsigned int i; | ||
393 | |||
394 | for (progp = serv->sv_program; progp; progp = progp->pg_next) { | ||
395 | for (i = 0; i < progp->pg_nvers; i++) { | ||
396 | if (progp->pg_vers[i] == NULL) | ||
397 | continue; | ||
398 | if (progp->pg_vers[i]->vs_hidden == 0) | ||
399 | return 1; | ||
400 | } | ||
401 | } | ||
402 | |||
403 | return 0; | ||
404 | } | ||
369 | 405 | ||
370 | /* | 406 | /* |
371 | * Create an RPC service | 407 | * Create an RPC service |
@@ -431,8 +467,15 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, | |||
431 | spin_lock_init(&pool->sp_lock); | 467 | spin_lock_init(&pool->sp_lock); |
432 | } | 468 | } |
433 | 469 | ||
434 | /* Remove any stale portmap registrations */ | 470 | if (svc_uses_rpcbind(serv)) { |
435 | svc_unregister(serv); | 471 | if (svc_rpcb_setup(serv) < 0) { |
472 | kfree(serv->sv_pools); | ||
473 | kfree(serv); | ||
474 | return NULL; | ||
475 | } | ||
476 | if (!serv->sv_shutdown) | ||
477 | serv->sv_shutdown = svc_rpcb_cleanup; | ||
478 | } | ||
436 | 479 | ||
437 | return serv; | 480 | return serv; |
438 | } | 481 | } |
@@ -500,7 +543,6 @@ svc_destroy(struct svc_serv *serv) | |||
500 | if (svc_serv_is_pooled(serv)) | 543 | if (svc_serv_is_pooled(serv)) |
501 | svc_pool_map_put(); | 544 | svc_pool_map_put(); |
502 | 545 | ||
503 | svc_unregister(serv); | ||
504 | kfree(serv->sv_pools); | 546 | kfree(serv->sv_pools); |
505 | kfree(serv); | 547 | kfree(serv); |
506 | } | 548 | } |
@@ -971,9 +1013,8 @@ static void svc_unregister(const struct svc_serv *serv) | |||
971 | /* | 1013 | /* |
972 | * Printk the given error with the address of the client that caused it. | 1014 | * Printk the given error with the address of the client that caused it. |
973 | */ | 1015 | */ |
974 | static int | 1016 | static __printf(2, 3) |
975 | __attribute__ ((format (printf, 2, 3))) | 1017 | int svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) |
976 | svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) | ||
977 | { | 1018 | { |
978 | va_list args; | 1019 | va_list args; |
979 | int r; | 1020 | int r; |
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index d86bb673e1f6..447cd0eb415c 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/sunrpc/svc_xprt.h> | 14 | #include <linux/sunrpc/svc_xprt.h> |
15 | #include <linux/sunrpc/svcsock.h> | 15 | #include <linux/sunrpc/svcsock.h> |
16 | #include <linux/sunrpc/xprt.h> | 16 | #include <linux/sunrpc/xprt.h> |
17 | #include <linux/module.h> | ||
17 | 18 | ||
18 | #define RPCDBG_FACILITY RPCDBG_SVCXPRT | 19 | #define RPCDBG_FACILITY RPCDBG_SVCXPRT |
19 | 20 | ||
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index dfd686eb0b7f..71bed1c1c77a 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/module.h> | ||
24 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
25 | #include <linux/fcntl.h> | 26 | #include <linux/fcntl.h> |
26 | #include <linux/net.h> | 27 | #include <linux/net.h> |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index a385430c722a..ba1296d88de0 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <rdma/ib_verbs.h> | 50 | #include <rdma/ib_verbs.h> |
51 | #include <rdma/rdma_cm.h> | 51 | #include <rdma/rdma_cm.h> |
52 | #include <linux/sunrpc/svc_rdma.h> | 52 | #include <linux/sunrpc/svc_rdma.h> |
53 | #include <linux/export.h> | ||
53 | 54 | ||
54 | #define RPCDBG_FACILITY RPCDBG_SVCXPRT | 55 | #define RPCDBG_FACILITY RPCDBG_SVCXPRT |
55 | 56 | ||
diff --git a/net/sysctl_net.c b/net/sysctl_net.c index ca84212cfbfe..e75813904f26 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/export.h> | ||
15 | #include <linux/sysctl.h> | 16 | #include <linux/sysctl.h> |
16 | #include <linux/nsproxy.h> | 17 | #include <linux/nsproxy.h> |
17 | 18 | ||
diff --git a/net/tipc/core.c b/net/tipc/core.c index 943b6af84265..c21331d58fdb 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
@@ -34,6 +34,8 @@ | |||
34 | * POSSIBILITY OF SUCH DAMAGE. | 34 | * POSSIBILITY OF SUCH DAMAGE. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/module.h> | ||
38 | |||
37 | #include "core.h" | 39 | #include "core.h" |
38 | #include "ref.h" | 40 | #include "ref.h" |
39 | #include "name_table.h" | 41 | #include "name_table.h" |
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 9440a3d48ca0..42b8324ff2ee 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -34,6 +34,7 @@ | |||
34 | * POSSIBILITY OF SUCH DAMAGE. | 34 | * POSSIBILITY OF SUCH DAMAGE. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/export.h> | ||
37 | #include <net/sock.h> | 38 | #include <net/sock.h> |
38 | 39 | ||
39 | #include "core.h" | 40 | #include "core.h" |
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index f346395314ba..c43612ee96bb 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c | |||
@@ -81,7 +81,6 @@ static struct proc_dir_entry *proc_router; | |||
81 | * Iterator | 81 | * Iterator |
82 | */ | 82 | */ |
83 | static void *r_start(struct seq_file *m, loff_t *pos) | 83 | static void *r_start(struct seq_file *m, loff_t *pos) |
84 | __acquires(kernel_lock) | ||
85 | { | 84 | { |
86 | struct wan_device *wandev; | 85 | struct wan_device *wandev; |
87 | loff_t l = *pos; | 86 | loff_t l = *pos; |
@@ -103,7 +102,6 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos) | |||
103 | } | 102 | } |
104 | 103 | ||
105 | static void r_stop(struct seq_file *m, void *v) | 104 | static void r_stop(struct seq_file *m, void *v) |
106 | __releases(kernel_lock) | ||
107 | { | 105 | { |
108 | mutex_unlock(&config_mutex); | 106 | mutex_unlock(&config_mutex); |
109 | } | 107 | } |
diff --git a/net/wimax/op-msg.c b/net/wimax/op-msg.c index d5b7c3779c43..0694d62e4dbc 100644 --- a/net/wimax/op-msg.c +++ b/net/wimax/op-msg.c | |||
@@ -77,6 +77,7 @@ | |||
77 | #include <linux/netdevice.h> | 77 | #include <linux/netdevice.h> |
78 | #include <linux/wimax.h> | 78 | #include <linux/wimax.h> |
79 | #include <linux/security.h> | 79 | #include <linux/security.h> |
80 | #include <linux/export.h> | ||
80 | #include "wimax-internal.h" | 81 | #include "wimax-internal.h" |
81 | 82 | ||
82 | 83 | ||
diff --git a/net/wimax/op-reset.c b/net/wimax/op-reset.c index 68bedf3e5443..7ceffe39d70e 100644 --- a/net/wimax/op-reset.c +++ b/net/wimax/op-reset.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <net/genetlink.h> | 32 | #include <net/genetlink.h> |
33 | #include <linux/wimax.h> | 33 | #include <linux/wimax.h> |
34 | #include <linux/security.h> | 34 | #include <linux/security.h> |
35 | #include <linux/export.h> | ||
35 | #include "wimax-internal.h" | 36 | #include "wimax-internal.h" |
36 | 37 | ||
37 | #define D_SUBMODULE op_reset | 38 | #define D_SUBMODULE op_reset |
diff --git a/net/wimax/op-rfkill.c b/net/wimax/op-rfkill.c index 2609e445fe7d..7ab60babdd22 100644 --- a/net/wimax/op-rfkill.c +++ b/net/wimax/op-rfkill.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <linux/wimax.h> | 65 | #include <linux/wimax.h> |
66 | #include <linux/security.h> | 66 | #include <linux/security.h> |
67 | #include <linux/rfkill.h> | 67 | #include <linux/rfkill.h> |
68 | #include <linux/export.h> | ||
68 | #include "wimax-internal.h" | 69 | #include "wimax-internal.h" |
69 | 70 | ||
70 | #define D_SUBMODULE op_rfkill | 71 | #define D_SUBMODULE op_rfkill |
diff --git a/net/wimax/stack.c b/net/wimax/stack.c index ee99e7dfcdba..3c65eae701c4 100644 --- a/net/wimax/stack.c +++ b/net/wimax/stack.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <net/genetlink.h> | 55 | #include <net/genetlink.h> |
56 | #include <linux/netdevice.h> | 56 | #include <linux/netdevice.h> |
57 | #include <linux/wimax.h> | 57 | #include <linux/wimax.h> |
58 | #include <linux/module.h> | ||
58 | #include "wimax-internal.h" | 59 | #include "wimax-internal.h" |
59 | 60 | ||
60 | 61 | ||
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index f33fbb79437c..30f20fe4a5fe 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/etherdevice.h> | 7 | #include <linux/etherdevice.h> |
8 | #include <linux/if_arp.h> | 8 | #include <linux/if_arp.h> |
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | #include <linux/export.h> | ||
10 | #include <net/cfg80211.h> | 11 | #include <net/cfg80211.h> |
11 | #include "wext-compat.h" | 12 | #include "wext-compat.h" |
12 | #include "nl80211.h" | 13 | #include "nl80211.h" |
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c index 4423e64c7d98..b7b7868f4128 100644 --- a/net/wireless/mesh.c +++ b/net/wireless/mesh.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/ieee80211.h> | 1 | #include <linux/ieee80211.h> |
2 | #include <linux/export.h> | ||
2 | #include <net/cfg80211.h> | 3 | #include <net/cfg80211.h> |
3 | #include "nl80211.h" | 4 | #include "nl80211.h" |
4 | #include "core.h" | 5 | #include "core.h" |
diff --git a/net/wireless/radiotap.c b/net/wireless/radiotap.c index dbe35e138e94..c4ad7958af52 100644 --- a/net/wireless/radiotap.c +++ b/net/wireless/radiotap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/export.h> | ||
18 | #include <net/cfg80211.h> | 19 | #include <net/cfg80211.h> |
19 | #include <net/ieee80211_radiotap.h> | 20 | #include <net/ieee80211_radiotap.h> |
20 | #include <asm/unaligned.h> | 21 | #include <asm/unaligned.h> |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index b66444d048d5..0e67016ce78f 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -36,12 +36,14 @@ | |||
36 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 36 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
37 | 37 | ||
38 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
39 | #include <linux/export.h> | ||
39 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
40 | #include <linux/list.h> | 41 | #include <linux/list.h> |
41 | #include <linux/random.h> | 42 | #include <linux/random.h> |
42 | #include <linux/ctype.h> | 43 | #include <linux/ctype.h> |
43 | #include <linux/nl80211.h> | 44 | #include <linux/nl80211.h> |
44 | #include <linux/platform_device.h> | 45 | #include <linux/platform_device.h> |
46 | #include <linux/moduleparam.h> | ||
45 | #include <net/cfg80211.h> | 47 | #include <net/cfg80211.h> |
46 | #include "core.h" | 48 | #include "core.h" |
47 | #include "reg.h" | 49 | #include "reg.h" |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index ed9d0e6f4a06..f0c900ce2fb9 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
12 | #include <linux/wireless.h> | 12 | #include <linux/wireless.h> |
13 | #include <linux/export.h> | ||
13 | #include <net/iw_handler.h> | 14 | #include <net/iw_handler.h> |
14 | #include <net/cfg80211.h> | 15 | #include <net/cfg80211.h> |
15 | #include <net/rtnetlink.h> | 16 | #include <net/rtnetlink.h> |
diff --git a/net/wireless/util.c b/net/wireless/util.c index b50e60e4485e..9c601d59b77a 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright 2007-2009 Johannes Berg <johannes@sipsolutions.net> | 4 | * Copyright 2007-2009 Johannes Berg <johannes@sipsolutions.net> |
5 | */ | 5 | */ |
6 | #include <linux/export.h> | ||
6 | #include <linux/bitops.h> | 7 | #include <linux/bitops.h> |
7 | #include <linux/etherdevice.h> | 8 | #include <linux/etherdevice.h> |
8 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index db38c8302b54..3c24eb97e9d7 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * Copyright 2008-2009 Johannes Berg <johannes@sipsolutions.net> | 8 | * Copyright 2008-2009 Johannes Berg <johannes@sipsolutions.net> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/export.h> | ||
11 | #include <linux/wireless.h> | 12 | #include <linux/wireless.h> |
12 | #include <linux/nl80211.h> | 13 | #include <linux/nl80211.h> |
13 | #include <linux/if_arp.h> | 14 | #include <linux/if_arp.h> |
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index fdbc23c10d8c..0af7f54e4f61 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/wireless.h> | 14 | #include <linux/wireless.h> |
15 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
16 | #include <linux/export.h> | ||
16 | #include <net/cfg80211.h> | 17 | #include <net/cfg80211.h> |
17 | #include <net/iw_handler.h> | 18 | #include <net/iw_handler.h> |
18 | #include <net/netlink.h> | 19 | #include <net/netlink.h> |
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index 0d4b8c3033ff..326750b99151 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * Copyright (C) 2009 Intel Corporation. All rights reserved. | 5 | * Copyright (C) 2009 Intel Corporation. All rights reserved. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/export.h> | ||
8 | #include <linux/etherdevice.h> | 9 | #include <linux/etherdevice.h> |
9 | #include <linux/if_arp.h> | 10 | #include <linux/if_arp.h> |
10 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
diff --git a/net/wireless/wext-spy.c b/net/wireless/wext-spy.c index 6dcfe65a2d1a..5d643a548feb 100644 --- a/net/wireless/wext-spy.c +++ b/net/wireless/wext-spy.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/wireless.h> | 10 | #include <linux/wireless.h> |
11 | #include <linux/netdevice.h> | 11 | #include <linux/netdevice.h> |
12 | #include <linux/etherdevice.h> | 12 | #include <linux/etherdevice.h> |
13 | #include <linux/export.h> | ||
13 | #include <net/iw_handler.h> | 14 | #include <net/iw_handler.h> |
14 | #include <net/arp.h> | 15 | #include <net/arp.h> |
15 | #include <net/wext.h> | 16 | #include <net/wext.h> |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 5f03e4ea65bf..3e16c6abde4f 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -1261,14 +1261,19 @@ static int x25_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1261 | struct x25_sock *x25 = x25_sk(sk); | 1261 | struct x25_sock *x25 = x25_sk(sk); |
1262 | struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name; | 1262 | struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name; |
1263 | size_t copied; | 1263 | size_t copied; |
1264 | int qbit, header_len = x25->neighbour->extended ? | 1264 | int qbit, header_len; |
1265 | X25_EXT_MIN_LEN : X25_STD_MIN_LEN; | ||
1266 | |||
1267 | struct sk_buff *skb; | 1265 | struct sk_buff *skb; |
1268 | unsigned char *asmptr; | 1266 | unsigned char *asmptr; |
1269 | int rc = -ENOTCONN; | 1267 | int rc = -ENOTCONN; |
1270 | 1268 | ||
1271 | lock_sock(sk); | 1269 | lock_sock(sk); |
1270 | |||
1271 | if (x25->neighbour == NULL) | ||
1272 | goto out; | ||
1273 | |||
1274 | header_len = x25->neighbour->extended ? | ||
1275 | X25_EXT_MIN_LEN : X25_STD_MIN_LEN; | ||
1276 | |||
1272 | /* | 1277 | /* |
1273 | * This works for seqpacket too. The receiver has ordered the queue for | 1278 | * This works for seqpacket too. The receiver has ordered the queue for |
1274 | * us! We do one quick check first though | 1279 | * us! We do one quick check first though |
diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c index 7ff373792324..2ffde4631ae2 100644 --- a/net/x25/x25_proc.c +++ b/net/x25/x25_proc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/export.h> | ||
23 | #include <net/net_namespace.h> | 24 | #include <net/net_namespace.h> |
24 | #include <net/sock.h> | 25 | #include <net/sock.h> |
25 | #include <net/x25.h> | 26 | #include <net/x25.h> |
diff --git a/net/xfrm/xfrm_proc.c b/net/xfrm/xfrm_proc.c index 58d9ae005597..d0a1af8ed584 100644 --- a/net/xfrm/xfrm_proc.c +++ b/net/xfrm/xfrm_proc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
15 | #include <linux/export.h> | ||
15 | #include <net/snmp.h> | 16 | #include <net/snmp.h> |
16 | #include <net/xfrm.h> | 17 | #include <net/xfrm.h> |
17 | 18 | ||
diff --git a/net/xfrm/xfrm_replay.c b/net/xfrm/xfrm_replay.c index 6ca357406ea8..39e02c54ed26 100644 --- a/net/xfrm/xfrm_replay.c +++ b/net/xfrm/xfrm_replay.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | 18 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/export.h> | ||
21 | #include <net/xfrm.h> | 22 | #include <net/xfrm.h> |
22 | 23 | ||
23 | u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq) | 24 | u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq) |