diff options
Diffstat (limited to 'net')
201 files changed, 458 insertions, 244 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 22f1a6c87035..661b461cf0b0 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 e8292369cdcf..5c406d3136f7 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 5a94eec06caa..940858a48cbd 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/messenger.c b/net/ceph/messenger.c index f466930e26fa..ad5b70801f37 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/ceph/messenger.h> | 18 | #include <linux/ceph/messenger.h> |
| 19 | #include <linux/ceph/decode.h> | 19 | #include <linux/ceph/decode.h> |
| 20 | #include <linux/ceph/pagelist.h> | 20 | #include <linux/ceph/pagelist.h> |
| 21 | #include <linux/export.h> | ||
| 21 | 22 | ||
| 22 | /* | 23 | /* |
| 23 | * Ceph uses the messenger to exchange ceph_msg messages with other | 24 | * Ceph uses the messenger to exchange ceph_msg messages with other |
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 ca4db40e75b8..18a3cebb753d 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 97f33588b65f..93b243422659 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 2ac033989e01..b3f65520e7a7 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 f80a35c0d000..f0fb737efa86 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 756b157c2edd..fb02ea52d2c2 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 ba2da11a997b..96f9fae32495 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 13427b194ced..3d414411a96e 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 b867bd55de7a..bb53726cb04a 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 83a0b050b374..105436dbb90d 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 df643cedf9b9..80de436eae20 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 48bbb96d8edb..1f8b120146d1 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 7439d26bf5f9..51e256c5fb78 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 4047e29acb3b..3925c6578767 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/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/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 dd5cc00ed559..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 | } |
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/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 2520a1b7e7db..6acba9d18cc8 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 6e86d5acf145..0acfdc9beacf 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 2f178f73943f..4dde429441d2 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 62f121d1d9cb..6897436b1d3f 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) |
