diff options
Diffstat (limited to 'net')
41 files changed, 102 insertions, 80 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index f6a92a0b7aa6..fbdfb1224ae1 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1844,7 +1844,6 @@ static const struct proto_ops SOCKOPS_WRAPPED(atalk_dgram_ops) = { | |||
1844 | .sendpage = sock_no_sendpage, | 1844 | .sendpage = sock_no_sendpage, |
1845 | }; | 1845 | }; |
1846 | 1846 | ||
1847 | #include <linux/smp_lock.h> | ||
1848 | SOCKOPS_WRAP(atalk_dgram, PF_APPLETALK); | 1847 | SOCKOPS_WRAP(atalk_dgram, PF_APPLETALK); |
1849 | 1848 | ||
1850 | static struct notifier_block ddp_notifier = { | 1849 | static struct notifier_block ddp_notifier = { |
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 6ded95272a53..429e13a6c6ad 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/smp_lock.h> | ||
27 | #include <linux/sockios.h> | 26 | #include <linux/sockios.h> |
28 | #include <linux/net.h> | 27 | #include <linux/net.h> |
29 | #include <net/ax25.h> | 28 | #include <net/ax25.h> |
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index ab2db55982ca..1c8f4a0c5f43 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/wait.h> | 38 | #include <linux/wait.h> |
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/smp_lock.h> | ||
41 | #include <linux/net.h> | 40 | #include <linux/net.h> |
42 | #include <net/sock.h> | 41 | #include <net/sock.h> |
43 | 42 | ||
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index ebb0861e9bd5..0e035d6162cc 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * 2 of the License, or (at your option) any later version. | 13 | * 2 of the License, or (at your option) any later version. |
14 | */ | 14 | */ |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/smp_lock.h> | ||
17 | 16 | ||
18 | #include "br_private.h" | 17 | #include "br_private.h" |
19 | #include "br_private_stp.h" | 18 | #include "br_private_stp.h" |
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 3e246b37020e..a786e7863200 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/smp_lock.h> | ||
18 | #include <linux/etherdevice.h> | 17 | #include <linux/etherdevice.h> |
19 | #include <linux/rtnetlink.h> | 18 | #include <linux/rtnetlink.h> |
20 | 19 | ||
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c index 030aa798fea7..24e0ca4a3131 100644 --- a/net/bridge/br_stp_timer.c +++ b/net/bridge/br_stp_timer.c | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/times.h> | 17 | #include <linux/times.h> |
18 | #include <linux/smp_lock.h> | ||
19 | 18 | ||
20 | #include "br_private.h" | 19 | #include "br_private.h" |
21 | #include "br_private_stp.h" | 20 | #include "br_private_stp.h" |
diff --git a/net/core/dev.c b/net/core/dev.c index 4317c1be4d3f..8301e2ac747f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3450,7 +3450,7 @@ static int dev_cpu_callback(struct notifier_block *nfb, | |||
3450 | unsigned int cpu, oldcpu = (unsigned long)ocpu; | 3450 | unsigned int cpu, oldcpu = (unsigned long)ocpu; |
3451 | struct softnet_data *sd, *oldsd; | 3451 | struct softnet_data *sd, *oldsd; |
3452 | 3452 | ||
3453 | if (action != CPU_DEAD) | 3453 | if (action != CPU_DEAD && action != CPU_DEAD_FROZEN) |
3454 | return NOTIFY_OK; | 3454 | return NOTIFY_OK; |
3455 | 3455 | ||
3456 | local_irq_disable(); | 3456 | local_irq_disable(); |
diff --git a/net/core/flow.c b/net/core/flow.c index 5d25697920b1..051430545a05 100644 --- a/net/core/flow.c +++ b/net/core/flow.c | |||
@@ -338,7 +338,7 @@ static int flow_cache_cpu(struct notifier_block *nfb, | |||
338 | unsigned long action, | 338 | unsigned long action, |
339 | void *hcpu) | 339 | void *hcpu) |
340 | { | 340 | { |
341 | if (action == CPU_DEAD) | 341 | if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) |
342 | __flow_cache_shrink((unsigned long)hcpu, 0); | 342 | __flow_cache_shrink((unsigned long)hcpu, 0); |
343 | return NOTIFY_OK; | 343 | return NOTIFY_OK; |
344 | } | 344 | } |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index b316435b0e2a..758dafe284c0 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Copyright (C) 2002 Red Hat, Inc. | 9 | * Copyright (C) 2002 Red Hat, Inc. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/smp_lock.h> | ||
13 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
14 | #include <linux/etherdevice.h> | 13 | #include <linux/etherdevice.h> |
15 | #include <linux/string.h> | 14 | #include <linux/string.h> |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index b92a322872a8..9cd3a1cb60ef 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -117,7 +117,6 @@ | |||
117 | #include <linux/module.h> | 117 | #include <linux/module.h> |
118 | #include <linux/moduleparam.h> | 118 | #include <linux/moduleparam.h> |
119 | #include <linux/kernel.h> | 119 | #include <linux/kernel.h> |
120 | #include <linux/smp_lock.h> | ||
121 | #include <linux/mutex.h> | 120 | #include <linux/mutex.h> |
122 | #include <linux/sched.h> | 121 | #include <linux/sched.h> |
123 | #include <linux/slab.h> | 122 | #include <linux/slab.h> |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 9fbe87c93802..bfa910b6ad25 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -1839,7 +1839,7 @@ static inline int dn_queue_too_long(struct dn_scp *scp, struct sk_buff_head *que | |||
1839 | } | 1839 | } |
1840 | 1840 | ||
1841 | /* | 1841 | /* |
1842 | * The DECnet spec requires the the "routing layer" accepts packets which | 1842 | * The DECnet spec requires that the "routing layer" accepts packets which |
1843 | * are at least 230 bytes in size. This excludes any headers which the NSP | 1843 | * are at least 230 bytes in size. This excludes any headers which the NSP |
1844 | * layer might add, so we always assume that we'll be using the maximal | 1844 | * layer might add, so we always assume that we'll be using the maximal |
1845 | * length header on data packets. The variation in length is due to the | 1845 | * length header on data packets. The variation in length is due to the |
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index e62aee0ec4c5..c68196cc56ab 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig | |||
@@ -130,7 +130,7 @@ config IP_ROUTE_MULTIPATH_RR | |||
130 | tristate "MULTIPATH: round robin algorithm" | 130 | tristate "MULTIPATH: round robin algorithm" |
131 | depends on IP_ROUTE_MULTIPATH_CACHED | 131 | depends on IP_ROUTE_MULTIPATH_CACHED |
132 | help | 132 | help |
133 | Mulitpath routes are chosen according to Round Robin | 133 | Multipath routes are chosen according to Round Robin |
134 | 134 | ||
135 | config IP_ROUTE_MULTIPATH_RANDOM | 135 | config IP_ROUTE_MULTIPATH_RANDOM |
136 | tristate "MULTIPATH: random algorithm" | 136 | tristate "MULTIPATH: random algorithm" |
@@ -651,7 +651,7 @@ config TCP_MD5SIG | |||
651 | select CRYPTO | 651 | select CRYPTO |
652 | select CRYPTO_MD5 | 652 | select CRYPTO_MD5 |
653 | ---help--- | 653 | ---help--- |
654 | RFC2385 specifices a method of giving MD5 protection to TCP sessions. | 654 | RFC2385 specifies a method of giving MD5 protection to TCP sessions. |
655 | Its main (only?) use is to protect BGP sessions between core routers | 655 | Its main (only?) use is to protect BGP sessions between core routers |
656 | on the Internet. | 656 | on the Internet. |
657 | 657 | ||
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 16aae8ef5555..041fba3fa0aa 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -92,7 +92,6 @@ | |||
92 | #include <asm/uaccess.h> | 92 | #include <asm/uaccess.h> |
93 | #include <asm/system.h> | 93 | #include <asm/system.h> |
94 | 94 | ||
95 | #include <linux/smp_lock.h> | ||
96 | #include <linux/inet.h> | 95 | #include <linux/inet.h> |
97 | #include <linux/igmp.h> | 96 | #include <linux/igmp.h> |
98 | #include <linux/inetdevice.h> | 97 | #include <linux/inetdevice.h> |
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index e1f18489db1d..86a2b52aad38 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
@@ -629,7 +629,7 @@ doi_walk_return: | |||
629 | * @domain: the domain to add | 629 | * @domain: the domain to add |
630 | * | 630 | * |
631 | * Description: | 631 | * Description: |
632 | * Adds the @domain to the the DOI specified by @doi_def, this function | 632 | * Adds the @domain to the DOI specified by @doi_def, this function |
633 | * should only be called by external functions (i.e. NetLabel). This function | 633 | * should only be called by external functions (i.e. NetLabel). This function |
634 | * does allocate memory. Returns zero on success, negative values on failure. | 634 | * does allocate memory. Returns zero on success, negative values on failure. |
635 | * | 635 | * |
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index b3050a6817e7..68fe1d4d0210 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c | |||
@@ -2387,6 +2387,7 @@ void ip_vs_control_cleanup(void) | |||
2387 | EnterFunction(2); | 2387 | EnterFunction(2); |
2388 | ip_vs_trash_cleanup(); | 2388 | ip_vs_trash_cleanup(); |
2389 | cancel_rearming_delayed_work(&defense_work); | 2389 | cancel_rearming_delayed_work(&defense_work); |
2390 | cancel_work_sync(&defense_work.work); | ||
2390 | ip_vs_kill_estimator(&ip_vs_stats); | 2391 | ip_vs_kill_estimator(&ip_vs_stats); |
2391 | unregister_sysctl_table(sysctl_header); | 2392 | unregister_sysctl_table(sysctl_header); |
2392 | proc_net_remove("ip_vs_stats"); | 2393 | proc_net_remove("ip_vs_stats"); |
diff --git a/net/ipv4/ipvs/ip_vs_sed.c b/net/ipv4/ipvs/ip_vs_sed.c index ff366f7390d9..dd7c128f9db3 100644 --- a/net/ipv4/ipvs/ip_vs_sed.c +++ b/net/ipv4/ipvs/ip_vs_sed.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * The SED algorithm attempts to minimize each job's expected delay until | 18 | * The SED algorithm attempts to minimize each job's expected delay until |
19 | * completion. The expected delay that the job will experience is | 19 | * completion. The expected delay that the job will experience is |
20 | * (Ci + 1) / Ui if sent to the ith server, in which Ci is the number of | 20 | * (Ci + 1) / Ui if sent to the ith server, in which Ci is the number of |
21 | * jobs on the the ith server and Ui is the fixed service rate (weight) of | 21 | * jobs on the ith server and Ui is the fixed service rate (weight) of |
22 | * the ith server. The SED algorithm adopts a greedy policy that each does | 22 | * the ith server. The SED algorithm adopts a greedy policy that each does |
23 | * what is in its own best interest, i.e. to join the queue which would | 23 | * what is in its own best interest, i.e. to join the queue which would |
24 | * minimize its expected delay of completion. | 24 | * minimize its expected delay of completion. |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 8b124eafbb90..bd4c295f5d79 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -252,7 +252,6 @@ | |||
252 | #include <linux/fcntl.h> | 252 | #include <linux/fcntl.h> |
253 | #include <linux/poll.h> | 253 | #include <linux/poll.h> |
254 | #include <linux/init.h> | 254 | #include <linux/init.h> |
255 | #include <linux/smp_lock.h> | ||
256 | #include <linux/fs.h> | 255 | #include <linux/fs.h> |
257 | #include <linux/random.h> | 256 | #include <linux/random.h> |
258 | #include <linux/bootmem.h> | 257 | #include <linux/bootmem.h> |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 0faacf9c419d..53232dd6fb48 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -40,7 +40,6 @@ | |||
40 | 40 | ||
41 | #include <linux/compiler.h> | 41 | #include <linux/compiler.h> |
42 | #include <linux/module.h> | 42 | #include <linux/module.h> |
43 | #include <linux/smp_lock.h> | ||
44 | 43 | ||
45 | /* People can turn this off for buggy TCP's found in printers etc. */ | 44 | /* People can turn this off for buggy TCP's found in printers etc. */ |
46 | int sysctl_tcp_retrans_collapse __read_mostly = 1; | 45 | int sysctl_tcp_retrans_collapse __read_mostly = 1; |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 113e0c4c8a92..66026df1cc76 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -983,7 +983,7 @@ int udp_disconnect(struct sock *sk, int flags) | |||
983 | } | 983 | } |
984 | 984 | ||
985 | /* return: | 985 | /* return: |
986 | * 1 if the the UDP system should process it | 986 | * 1 if the UDP system should process it |
987 | * 0 if we should drop this packet | 987 | * 0 if we should drop this packet |
988 | * -1 if it should get processed by xfrm4_rcv_encap | 988 | * -1 if it should get processed by xfrm4_rcv_encap |
989 | */ | 989 | */ |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 18cb928c8d92..6dd377253cf7 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <linux/inet.h> | 42 | #include <linux/inet.h> |
43 | #include <linux/netdevice.h> | 43 | #include <linux/netdevice.h> |
44 | #include <linux/icmpv6.h> | 44 | #include <linux/icmpv6.h> |
45 | #include <linux/smp_lock.h> | ||
46 | #include <linux/netfilter_ipv6.h> | 45 | #include <linux/netfilter_ipv6.h> |
47 | 46 | ||
48 | #include <net/ip.h> | 47 | #include <net/ip.h> |
diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index bbe99f842f9f..838b8ddee8c0 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig | |||
@@ -28,7 +28,7 @@ config IP6_NF_QUEUE | |||
28 | packets which enables users to receive the filtered packets | 28 | packets which enables users to receive the filtered packets |
29 | with QUEUE target using libipq. | 29 | with QUEUE target using libipq. |
30 | 30 | ||
31 | THis option enables the old IPv6-only "ip6_queue" implementation | 31 | This option enables the old IPv6-only "ip6_queue" implementation |
32 | which has been obsoleted by the new "nfnetlink_queue" code (see | 32 | which has been obsoleted by the new "nfnetlink_queue" code (see |
33 | CONFIG_NETFILTER_NETLINK_QUEUE). | 33 | CONFIG_NETFILTER_NETLINK_QUEUE). |
34 | 34 | ||
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index 392f8bc92691..15419dd682fd 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c | |||
@@ -1961,7 +1961,6 @@ static const struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = { | |||
1961 | .sendpage = sock_no_sendpage, | 1961 | .sendpage = sock_no_sendpage, |
1962 | }; | 1962 | }; |
1963 | 1963 | ||
1964 | #include <linux/smp_lock.h> | ||
1965 | SOCKOPS_WRAP(ipx_dgram, PF_IPX); | 1964 | SOCKOPS_WRAP(ipx_dgram, PF_IPX); |
1966 | 1965 | ||
1967 | static struct packet_type ipx_8023_packet_type = { | 1966 | static struct packet_type ipx_8023_packet_type = { |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 06c97c60d542..dcd7e325b283 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -2538,7 +2538,6 @@ static const struct proto_ops SOCKOPS_WRAPPED(irda_ultra_ops) = { | |||
2538 | }; | 2538 | }; |
2539 | #endif /* CONFIG_IRDA_ULTRA */ | 2539 | #endif /* CONFIG_IRDA_ULTRA */ |
2540 | 2540 | ||
2541 | #include <linux/smp_lock.h> | ||
2542 | SOCKOPS_WRAP(irda_stream, PF_IRDA); | 2541 | SOCKOPS_WRAP(irda_stream, PF_IRDA); |
2543 | SOCKOPS_WRAP(irda_seqpacket, PF_IRDA); | 2542 | SOCKOPS_WRAP(irda_seqpacket, PF_IRDA); |
2544 | SOCKOPS_WRAP(irda_dgram, PF_IRDA); | 2543 | SOCKOPS_WRAP(irda_dgram, PF_IRDA); |
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index fb3faf72e850..b7333061016d 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
@@ -556,6 +556,7 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self, | |||
556 | 556 | ||
557 | switch (action) { | 557 | switch (action) { |
558 | case CPU_UP_PREPARE: | 558 | case CPU_UP_PREPARE: |
559 | case CPU_UP_PREPARE_FROZEN: | ||
559 | if (!percpu_populate(iucv_irq_data, | 560 | if (!percpu_populate(iucv_irq_data, |
560 | sizeof(struct iucv_irq_data), | 561 | sizeof(struct iucv_irq_data), |
561 | GFP_KERNEL|GFP_DMA, cpu)) | 562 | GFP_KERNEL|GFP_DMA, cpu)) |
@@ -567,15 +568,20 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self, | |||
567 | } | 568 | } |
568 | break; | 569 | break; |
569 | case CPU_UP_CANCELED: | 570 | case CPU_UP_CANCELED: |
571 | case CPU_UP_CANCELED_FROZEN: | ||
570 | case CPU_DEAD: | 572 | case CPU_DEAD: |
573 | case CPU_DEAD_FROZEN: | ||
571 | percpu_depopulate(iucv_param, cpu); | 574 | percpu_depopulate(iucv_param, cpu); |
572 | percpu_depopulate(iucv_irq_data, cpu); | 575 | percpu_depopulate(iucv_irq_data, cpu); |
573 | break; | 576 | break; |
574 | case CPU_ONLINE: | 577 | case CPU_ONLINE: |
578 | case CPU_ONLINE_FROZEN: | ||
575 | case CPU_DOWN_FAILED: | 579 | case CPU_DOWN_FAILED: |
580 | case CPU_DOWN_FAILED_FROZEN: | ||
576 | smp_call_function_on(iucv_declare_cpu, NULL, 0, 1, cpu); | 581 | smp_call_function_on(iucv_declare_cpu, NULL, 0, 1, cpu); |
577 | break; | 582 | break; |
578 | case CPU_DOWN_PREPARE: | 583 | case CPU_DOWN_PREPARE: |
584 | case CPU_DOWN_PREPARE_FROZEN: | ||
579 | cpumask = iucv_buffer_cpumask; | 585 | cpumask = iucv_buffer_cpumask; |
580 | cpu_clear(cpu, cpumask); | 586 | cpu_clear(cpu, cpumask); |
581 | if (cpus_empty(cpumask)) | 587 | if (cpus_empty(cpumask)) |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 7d9fa38b6a7d..6b8a103cf9e6 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -324,7 +324,7 @@ static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen) | |||
324 | memset(&laddr, 0, sizeof(laddr)); | 324 | memset(&laddr, 0, sizeof(laddr)); |
325 | memset(&daddr, 0, sizeof(daddr)); | 325 | memset(&daddr, 0, sizeof(daddr)); |
326 | /* | 326 | /* |
327 | * FIXME: check if the the address is multicast, | 327 | * FIXME: check if the address is multicast, |
328 | * only SOCK_DGRAM can do this. | 328 | * only SOCK_DGRAM can do this. |
329 | */ | 329 | */ |
330 | memcpy(laddr.mac, addr->sllc_mac, IFHWADDRLEN); | 330 | memcpy(laddr.mac, addr->sllc_mac, IFHWADDRLEN); |
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index ea6211cade0a..a567dae8e5fd 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig | |||
@@ -197,7 +197,7 @@ config NF_CONNTRACK_PPTP | |||
197 | 197 | ||
198 | Please note that not all PPTP modes of operation are supported yet. | 198 | Please note that not all PPTP modes of operation are supported yet. |
199 | Specifically these limitations exist: | 199 | Specifically these limitations exist: |
200 | - Blindy assumes that control connections are always established | 200 | - Blindly assumes that control connections are always established |
201 | in PNS->PAC direction. This is a violation of RFC2637. | 201 | in PNS->PAC direction. This is a violation of RFC2637. |
202 | - Only supports a single call within each session | 202 | - Only supports a single call within each session |
203 | 203 | ||
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index c31af29a4439..117cbfdb910c 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -177,7 +177,7 @@ void nf_conntrack_unexpect_related(struct nf_conntrack_expect *exp) | |||
177 | struct nf_conntrack_expect *i; | 177 | struct nf_conntrack_expect *i; |
178 | 178 | ||
179 | write_lock_bh(&nf_conntrack_lock); | 179 | write_lock_bh(&nf_conntrack_lock); |
180 | /* choose the the oldest expectation to evict */ | 180 | /* choose the oldest expectation to evict */ |
181 | list_for_each_entry_reverse(i, &nf_conntrack_expect_list, list) { | 181 | list_for_each_entry_reverse(i, &nf_conntrack_expect_list, list) { |
182 | if (expect_matches(i, exp) && del_timer(&i->timeout)) { | 182 | if (expect_matches(i, exp) && del_timer(&i->timeout)) { |
183 | nf_ct_unlink_expect(i); | 183 | nf_ct_unlink_expect(i); |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 507828d7d4ae..1f15821c8da4 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <linux/rtnetlink.h> | 45 | #include <linux/rtnetlink.h> |
46 | #include <linux/proc_fs.h> | 46 | #include <linux/proc_fs.h> |
47 | #include <linux/seq_file.h> | 47 | #include <linux/seq_file.h> |
48 | #include <linux/smp_lock.h> | ||
49 | #include <linux/notifier.h> | 48 | #include <linux/notifier.h> |
50 | #include <linux/security.h> | 49 | #include <linux/security.h> |
51 | #include <linux/jhash.h> | 50 | #include <linux/jhash.h> |
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index 83ef411772f4..77fb7b06a9c4 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * This file is part of the SCTP kernel reference Implementation | 4 | * This file is part of the SCTP kernel reference Implementation |
5 | * | 5 | * |
6 | * This file contains the code relating the the chunk abstraction. | 6 | * This file contains the code relating the chunk abstraction. |
7 | * | 7 | * |
8 | * The SCTP reference implementation is free software; | 8 | * The SCTP reference implementation is free software; |
9 | * you can redistribute it and/or modify it under the terms of | 9 | * you can redistribute it and/or modify it under the terms of |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 9f1a908776de..83a76ba9d7b3 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -2586,7 +2586,7 @@ static int sctp_setsockopt_rtoinfo(struct sock *sk, char __user *optval, int opt | |||
2586 | * | 2586 | * |
2587 | * 7.1.2 SCTP_ASSOCINFO | 2587 | * 7.1.2 SCTP_ASSOCINFO |
2588 | * | 2588 | * |
2589 | * This option is used to tune the the maximum retransmission attempts | 2589 | * This option is used to tune the maximum retransmission attempts |
2590 | * of the association. | 2590 | * of the association. |
2591 | * Returns an error if the new association retransmission value is | 2591 | * Returns an error if the new association retransmission value is |
2592 | * greater than the sum of the retransmission value of the peer. | 2592 | * greater than the sum of the retransmission value of the peer. |
@@ -4547,7 +4547,7 @@ static int sctp_getsockopt_rtoinfo(struct sock *sk, int len, | |||
4547 | * | 4547 | * |
4548 | * 7.1.2 SCTP_ASSOCINFO | 4548 | * 7.1.2 SCTP_ASSOCINFO |
4549 | * | 4549 | * |
4550 | * This option is used to tune the the maximum retransmission attempts | 4550 | * This option is used to tune the maximum retransmission attempts |
4551 | * of the association. | 4551 | * of the association. |
4552 | * Returns an error if the new association retransmission value is | 4552 | * Returns an error if the new association retransmission value is |
4553 | * greater than the sum of the retransmission value of the peer. | 4553 | * greater than the sum of the retransmission value of the peer. |
diff --git a/net/socket.c b/net/socket.c index 759825b7ca26..98a8f67abbfc 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -313,8 +313,19 @@ static int sockfs_delete_dentry(struct dentry *dentry) | |||
313 | dentry->d_flags |= DCACHE_UNHASHED; | 313 | dentry->d_flags |= DCACHE_UNHASHED; |
314 | return 0; | 314 | return 0; |
315 | } | 315 | } |
316 | |||
317 | /* | ||
318 | * sockfs_dname() is called from d_path(). | ||
319 | */ | ||
320 | static char *sockfs_dname(struct dentry *dentry, char *buffer, int buflen) | ||
321 | { | ||
322 | return dynamic_dname(dentry, buffer, buflen, "socket:[%lu]", | ||
323 | dentry->d_inode->i_ino); | ||
324 | } | ||
325 | |||
316 | static struct dentry_operations sockfs_dentry_operations = { | 326 | static struct dentry_operations sockfs_dentry_operations = { |
317 | .d_delete = sockfs_delete_dentry, | 327 | .d_delete = sockfs_delete_dentry, |
328 | .d_dname = sockfs_dname, | ||
318 | }; | 329 | }; |
319 | 330 | ||
320 | /* | 331 | /* |
@@ -354,14 +365,9 @@ static int sock_alloc_fd(struct file **filep) | |||
354 | 365 | ||
355 | static int sock_attach_fd(struct socket *sock, struct file *file) | 366 | static int sock_attach_fd(struct socket *sock, struct file *file) |
356 | { | 367 | { |
357 | struct qstr this; | 368 | struct qstr name = { .name = "" }; |
358 | char name[32]; | ||
359 | |||
360 | this.len = sprintf(name, "[%lu]", SOCK_INODE(sock)->i_ino); | ||
361 | this.name = name; | ||
362 | this.hash = 0; | ||
363 | 369 | ||
364 | file->f_path.dentry = d_alloc(sock_mnt->mnt_sb->s_root, &this); | 370 | file->f_path.dentry = d_alloc(sock_mnt->mnt_sb->s_root, &name); |
365 | if (unlikely(!file->f_path.dentry)) | 371 | if (unlikely(!file->f_path.dentry)) |
366 | return -ENOMEM; | 372 | return -ENOMEM; |
367 | 373 | ||
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index db298b501c81..099a983797da 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -924,6 +924,7 @@ static inline int | |||
924 | gss_write_init_verf(struct svc_rqst *rqstp, struct rsi *rsip) | 924 | gss_write_init_verf(struct svc_rqst *rqstp, struct rsi *rsip) |
925 | { | 925 | { |
926 | struct rsc *rsci; | 926 | struct rsc *rsci; |
927 | int rc; | ||
927 | 928 | ||
928 | if (rsip->major_status != GSS_S_COMPLETE) | 929 | if (rsip->major_status != GSS_S_COMPLETE) |
929 | return gss_write_null_verf(rqstp); | 930 | return gss_write_null_verf(rqstp); |
@@ -932,7 +933,9 @@ gss_write_init_verf(struct svc_rqst *rqstp, struct rsi *rsip) | |||
932 | rsip->major_status = GSS_S_NO_CONTEXT; | 933 | rsip->major_status = GSS_S_NO_CONTEXT; |
933 | return gss_write_null_verf(rqstp); | 934 | return gss_write_null_verf(rqstp); |
934 | } | 935 | } |
935 | return gss_write_verf(rqstp, rsci->mechctx, GSS_SEQ_WIN); | 936 | rc = gss_write_verf(rqstp, rsci->mechctx, GSS_SEQ_WIN); |
937 | cache_put(&rsci->h, &rsc_cache); | ||
938 | return rc; | ||
936 | } | 939 | } |
937 | 940 | ||
938 | /* | 941 | /* |
@@ -1089,6 +1092,8 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) | |||
1089 | } | 1092 | } |
1090 | goto complete; | 1093 | goto complete; |
1091 | case RPC_GSS_PROC_DESTROY: | 1094 | case RPC_GSS_PROC_DESTROY: |
1095 | if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq)) | ||
1096 | goto auth_err; | ||
1092 | set_bit(CACHE_NEGATIVE, &rsci->h.flags); | 1097 | set_bit(CACHE_NEGATIVE, &rsci->h.flags); |
1093 | if (resv->iov_len + 4 > PAGE_SIZE) | 1098 | if (resv->iov_len + 4 > PAGE_SIZE) |
1094 | goto drop; | 1099 | goto drop; |
@@ -1196,13 +1201,7 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) | |||
1196 | if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, | 1201 | if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, |
1197 | integ_len)) | 1202 | integ_len)) |
1198 | BUG(); | 1203 | BUG(); |
1199 | if (resbuf->page_len == 0 | 1204 | if (resbuf->tail[0].iov_base == NULL) { |
1200 | && resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE | ||
1201 | < PAGE_SIZE) { | ||
1202 | BUG_ON(resbuf->tail[0].iov_len); | ||
1203 | /* Use head for everything */ | ||
1204 | resv = &resbuf->head[0]; | ||
1205 | } else if (resbuf->tail[0].iov_base == NULL) { | ||
1206 | if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) | 1205 | if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) |
1207 | goto out_err; | 1206 | goto out_err; |
1208 | resbuf->tail[0].iov_base = resbuf->head[0].iov_base | 1207 | resbuf->tail[0].iov_base = resbuf->head[0].iov_base |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index ad39b47e05bc..a2f1893bde53 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -845,6 +845,8 @@ init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | |||
845 | 845 | ||
846 | int register_rpc_pipefs(void) | 846 | int register_rpc_pipefs(void) |
847 | { | 847 | { |
848 | int err; | ||
849 | |||
848 | rpc_inode_cachep = kmem_cache_create("rpc_inode_cache", | 850 | rpc_inode_cachep = kmem_cache_create("rpc_inode_cache", |
849 | sizeof(struct rpc_inode), | 851 | sizeof(struct rpc_inode), |
850 | 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| | 852 | 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| |
@@ -852,7 +854,12 @@ int register_rpc_pipefs(void) | |||
852 | init_once, NULL); | 854 | init_once, NULL); |
853 | if (!rpc_inode_cachep) | 855 | if (!rpc_inode_cachep) |
854 | return -ENOMEM; | 856 | return -ENOMEM; |
855 | register_filesystem(&rpc_pipe_fs_type); | 857 | err = register_filesystem(&rpc_pipe_fs_type); |
858 | if (err) { | ||
859 | kmem_cache_destroy(rpc_inode_cachep); | ||
860 | return err; | ||
861 | } | ||
862 | |||
856 | return 0; | 863 | return 0; |
857 | } | 864 | } |
858 | 865 | ||
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 4a53e94f8134..b011eb625e49 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -736,6 +736,11 @@ static void rpc_async_schedule(struct work_struct *work) | |||
736 | __rpc_execute(container_of(work, struct rpc_task, u.tk_work)); | 736 | __rpc_execute(container_of(work, struct rpc_task, u.tk_work)); |
737 | } | 737 | } |
738 | 738 | ||
739 | struct rpc_buffer { | ||
740 | size_t len; | ||
741 | char data[]; | ||
742 | }; | ||
743 | |||
739 | /** | 744 | /** |
740 | * rpc_malloc - allocate an RPC buffer | 745 | * rpc_malloc - allocate an RPC buffer |
741 | * @task: RPC task that will use this buffer | 746 | * @task: RPC task that will use this buffer |
@@ -754,18 +759,22 @@ static void rpc_async_schedule(struct work_struct *work) | |||
754 | */ | 759 | */ |
755 | void *rpc_malloc(struct rpc_task *task, size_t size) | 760 | void *rpc_malloc(struct rpc_task *task, size_t size) |
756 | { | 761 | { |
757 | size_t *buf; | 762 | struct rpc_buffer *buf; |
758 | gfp_t gfp = RPC_IS_SWAPPER(task) ? GFP_ATOMIC : GFP_NOWAIT; | 763 | gfp_t gfp = RPC_IS_SWAPPER(task) ? GFP_ATOMIC : GFP_NOWAIT; |
759 | 764 | ||
760 | size += sizeof(size_t); | 765 | size += sizeof(struct rpc_buffer); |
761 | if (size <= RPC_BUFFER_MAXSIZE) | 766 | if (size <= RPC_BUFFER_MAXSIZE) |
762 | buf = mempool_alloc(rpc_buffer_mempool, gfp); | 767 | buf = mempool_alloc(rpc_buffer_mempool, gfp); |
763 | else | 768 | else |
764 | buf = kmalloc(size, gfp); | 769 | buf = kmalloc(size, gfp); |
765 | *buf = size; | 770 | |
766 | dprintk("RPC: %5u allocated buffer of size %u at %p\n", | 771 | if (!buf) |
772 | return NULL; | ||
773 | |||
774 | buf->len = size; | ||
775 | dprintk("RPC: %5u allocated buffer of size %zu at %p\n", | ||
767 | task->tk_pid, size, buf); | 776 | task->tk_pid, size, buf); |
768 | return (void *) ++buf; | 777 | return &buf->data; |
769 | } | 778 | } |
770 | 779 | ||
771 | /** | 780 | /** |
@@ -775,15 +784,18 @@ void *rpc_malloc(struct rpc_task *task, size_t size) | |||
775 | */ | 784 | */ |
776 | void rpc_free(void *buffer) | 785 | void rpc_free(void *buffer) |
777 | { | 786 | { |
778 | size_t size, *buf = (size_t *) buffer; | 787 | size_t size; |
788 | struct rpc_buffer *buf; | ||
779 | 789 | ||
780 | if (!buffer) | 790 | if (!buffer) |
781 | return; | 791 | return; |
782 | size = *buf; | ||
783 | buf--; | ||
784 | 792 | ||
785 | dprintk("RPC: freeing buffer of size %u at %p\n", | 793 | buf = container_of(buffer, struct rpc_buffer, data); |
794 | size = buf->len; | ||
795 | |||
796 | dprintk("RPC: freeing buffer of size %zu at %p\n", | ||
786 | size, buf); | 797 | size, buf); |
798 | |||
787 | if (size <= RPC_BUFFER_MAXSIZE) | 799 | if (size <= RPC_BUFFER_MAXSIZE) |
788 | mempool_free(buf, rpc_buffer_mempool); | 800 | mempool_free(buf, rpc_buffer_mempool); |
789 | else | 801 | else |
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index 43ecf62f12ef..0d35bc796d00 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c | |||
@@ -146,9 +146,11 @@ init_sunrpc(void) | |||
146 | int err = register_rpc_pipefs(); | 146 | int err = register_rpc_pipefs(); |
147 | if (err) | 147 | if (err) |
148 | goto out; | 148 | goto out; |
149 | err = rpc_init_mempool() != 0; | 149 | err = rpc_init_mempool(); |
150 | if (err) | 150 | if (err) { |
151 | unregister_rpc_pipefs(); | ||
151 | goto out; | 152 | goto out; |
153 | } | ||
152 | #ifdef RPC_DEBUG | 154 | #ifdef RPC_DEBUG |
153 | rpc_register_sysctl(); | 155 | rpc_register_sysctl(); |
154 | #endif | 156 | #endif |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index b7503c103ae8..e673ef993904 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -907,7 +907,7 @@ svc_process(struct svc_rqst *rqstp) | |||
907 | * better idea of reply size | 907 | * better idea of reply size |
908 | */ | 908 | */ |
909 | if (procp->pc_xdrressize) | 909 | if (procp->pc_xdrressize) |
910 | svc_reserve(rqstp, procp->pc_xdrressize<<2); | 910 | svc_reserve_auth(rqstp, procp->pc_xdrressize<<2); |
911 | 911 | ||
912 | /* Call the function that processes the request. */ | 912 | /* Call the function that processes the request. */ |
913 | if (!versp->vs_dispatch) { | 913 | if (!versp->vs_dispatch) { |
diff --git a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c index f5c3808bf85a..af7c5f05c6e1 100644 --- a/net/sunrpc/svcauth.c +++ b/net/sunrpc/svcauth.c | |||
@@ -64,7 +64,7 @@ int svc_set_client(struct svc_rqst *rqstp) | |||
64 | } | 64 | } |
65 | 65 | ||
66 | /* A request, which was authenticated, has now executed. | 66 | /* A request, which was authenticated, has now executed. |
67 | * Time to finalise the the credentials and verifier | 67 | * Time to finalise the credentials and verifier |
68 | * and release and resources | 68 | * and release and resources |
69 | */ | 69 | */ |
70 | int svc_authorise(struct svc_rqst *rqstp) | 70 | int svc_authorise(struct svc_rqst *rqstp) |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 2bd23ea2aa8b..07dcd20cbee4 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -385,7 +385,7 @@ ip_map_cached_get(struct svc_rqst *rqstp) | |||
385 | { | 385 | { |
386 | struct ip_map *ipm; | 386 | struct ip_map *ipm; |
387 | struct svc_sock *svsk = rqstp->rq_sock; | 387 | struct svc_sock *svsk = rqstp->rq_sock; |
388 | spin_lock_bh(&svsk->sk_defer_lock); | 388 | spin_lock(&svsk->sk_lock); |
389 | ipm = svsk->sk_info_authunix; | 389 | ipm = svsk->sk_info_authunix; |
390 | if (ipm != NULL) { | 390 | if (ipm != NULL) { |
391 | if (!cache_valid(&ipm->h)) { | 391 | if (!cache_valid(&ipm->h)) { |
@@ -395,13 +395,13 @@ ip_map_cached_get(struct svc_rqst *rqstp) | |||
395 | * same IP address. | 395 | * same IP address. |
396 | */ | 396 | */ |
397 | svsk->sk_info_authunix = NULL; | 397 | svsk->sk_info_authunix = NULL; |
398 | spin_unlock_bh(&svsk->sk_defer_lock); | 398 | spin_unlock(&svsk->sk_lock); |
399 | cache_put(&ipm->h, &ip_map_cache); | 399 | cache_put(&ipm->h, &ip_map_cache); |
400 | return NULL; | 400 | return NULL; |
401 | } | 401 | } |
402 | cache_get(&ipm->h); | 402 | cache_get(&ipm->h); |
403 | } | 403 | } |
404 | spin_unlock_bh(&svsk->sk_defer_lock); | 404 | spin_unlock(&svsk->sk_lock); |
405 | return ipm; | 405 | return ipm; |
406 | } | 406 | } |
407 | 407 | ||
@@ -410,14 +410,14 @@ ip_map_cached_put(struct svc_rqst *rqstp, struct ip_map *ipm) | |||
410 | { | 410 | { |
411 | struct svc_sock *svsk = rqstp->rq_sock; | 411 | struct svc_sock *svsk = rqstp->rq_sock; |
412 | 412 | ||
413 | spin_lock_bh(&svsk->sk_defer_lock); | 413 | spin_lock(&svsk->sk_lock); |
414 | if (svsk->sk_sock->type == SOCK_STREAM && | 414 | if (svsk->sk_sock->type == SOCK_STREAM && |
415 | svsk->sk_info_authunix == NULL) { | 415 | svsk->sk_info_authunix == NULL) { |
416 | /* newly cached, keep the reference */ | 416 | /* newly cached, keep the reference */ |
417 | svsk->sk_info_authunix = ipm; | 417 | svsk->sk_info_authunix = ipm; |
418 | ipm = NULL; | 418 | ipm = NULL; |
419 | } | 419 | } |
420 | spin_unlock_bh(&svsk->sk_defer_lock); | 420 | spin_unlock(&svsk->sk_lock); |
421 | if (ipm) | 421 | if (ipm) |
422 | cache_put(&ipm->h, &ip_map_cache); | 422 | cache_put(&ipm->h, &ip_map_cache); |
423 | } | 423 | } |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 22f61aee4824..5baf48de2558 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -53,7 +53,8 @@ | |||
53 | * svc_serv->sv_lock protects sv_tempsocks, sv_permsocks, sv_tmpcnt. | 53 | * svc_serv->sv_lock protects sv_tempsocks, sv_permsocks, sv_tmpcnt. |
54 | * when both need to be taken (rare), svc_serv->sv_lock is first. | 54 | * when both need to be taken (rare), svc_serv->sv_lock is first. |
55 | * BKL protects svc_serv->sv_nrthread. | 55 | * BKL protects svc_serv->sv_nrthread. |
56 | * svc_sock->sk_defer_lock protects the svc_sock->sk_deferred list | 56 | * svc_sock->sk_lock protects the svc_sock->sk_deferred list |
57 | * and the ->sk_info_authunix cache. | ||
57 | * svc_sock->sk_flags.SK_BUSY prevents a svc_sock being enqueued multiply. | 58 | * svc_sock->sk_flags.SK_BUSY prevents a svc_sock being enqueued multiply. |
58 | * | 59 | * |
59 | * Some flags can be set to certain values at any time | 60 | * Some flags can be set to certain values at any time |
@@ -787,15 +788,20 @@ svc_udp_recvfrom(struct svc_rqst *rqstp) | |||
787 | } | 788 | } |
788 | 789 | ||
789 | clear_bit(SK_DATA, &svsk->sk_flags); | 790 | clear_bit(SK_DATA, &svsk->sk_flags); |
790 | while ((err = kernel_recvmsg(svsk->sk_sock, &msg, NULL, | 791 | skb = NULL; |
791 | 0, 0, MSG_PEEK | MSG_DONTWAIT)) < 0 || | 792 | err = kernel_recvmsg(svsk->sk_sock, &msg, NULL, |
792 | (skb = skb_recv_datagram(svsk->sk_sk, 0, 1, &err)) == NULL) { | 793 | 0, 0, MSG_PEEK | MSG_DONTWAIT); |
793 | if (err == -EAGAIN) { | 794 | if (err >= 0) |
794 | svc_sock_received(svsk); | 795 | skb = skb_recv_datagram(svsk->sk_sk, 0, 1, &err); |
795 | return err; | 796 | |
797 | if (skb == NULL) { | ||
798 | if (err != -EAGAIN) { | ||
799 | /* possibly an icmp error */ | ||
800 | dprintk("svc: recvfrom returned error %d\n", -err); | ||
801 | set_bit(SK_DATA, &svsk->sk_flags); | ||
796 | } | 802 | } |
797 | /* possibly an icmp error */ | 803 | svc_sock_received(svsk); |
798 | dprintk("svc: recvfrom returned error %d\n", -err); | 804 | return -EAGAIN; |
799 | } | 805 | } |
800 | rqstp->rq_addrlen = sizeof(rqstp->rq_addr); | 806 | rqstp->rq_addrlen = sizeof(rqstp->rq_addr); |
801 | if (skb->tstamp.tv64 == 0) { | 807 | if (skb->tstamp.tv64 == 0) { |
@@ -1633,7 +1639,7 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv, | |||
1633 | svsk->sk_server = serv; | 1639 | svsk->sk_server = serv; |
1634 | atomic_set(&svsk->sk_inuse, 1); | 1640 | atomic_set(&svsk->sk_inuse, 1); |
1635 | svsk->sk_lastrecv = get_seconds(); | 1641 | svsk->sk_lastrecv = get_seconds(); |
1636 | spin_lock_init(&svsk->sk_defer_lock); | 1642 | spin_lock_init(&svsk->sk_lock); |
1637 | INIT_LIST_HEAD(&svsk->sk_deferred); | 1643 | INIT_LIST_HEAD(&svsk->sk_deferred); |
1638 | INIT_LIST_HEAD(&svsk->sk_ready); | 1644 | INIT_LIST_HEAD(&svsk->sk_ready); |
1639 | mutex_init(&svsk->sk_mutex); | 1645 | mutex_init(&svsk->sk_mutex); |
@@ -1857,9 +1863,9 @@ static void svc_revisit(struct cache_deferred_req *dreq, int too_many) | |||
1857 | dprintk("revisit queued\n"); | 1863 | dprintk("revisit queued\n"); |
1858 | svsk = dr->svsk; | 1864 | svsk = dr->svsk; |
1859 | dr->svsk = NULL; | 1865 | dr->svsk = NULL; |
1860 | spin_lock_bh(&svsk->sk_defer_lock); | 1866 | spin_lock(&svsk->sk_lock); |
1861 | list_add(&dr->handle.recent, &svsk->sk_deferred); | 1867 | list_add(&dr->handle.recent, &svsk->sk_deferred); |
1862 | spin_unlock_bh(&svsk->sk_defer_lock); | 1868 | spin_unlock(&svsk->sk_lock); |
1863 | set_bit(SK_DEFERRED, &svsk->sk_flags); | 1869 | set_bit(SK_DEFERRED, &svsk->sk_flags); |
1864 | svc_sock_enqueue(svsk); | 1870 | svc_sock_enqueue(svsk); |
1865 | svc_sock_put(svsk); | 1871 | svc_sock_put(svsk); |
@@ -1925,7 +1931,7 @@ static struct svc_deferred_req *svc_deferred_dequeue(struct svc_sock *svsk) | |||
1925 | 1931 | ||
1926 | if (!test_bit(SK_DEFERRED, &svsk->sk_flags)) | 1932 | if (!test_bit(SK_DEFERRED, &svsk->sk_flags)) |
1927 | return NULL; | 1933 | return NULL; |
1928 | spin_lock_bh(&svsk->sk_defer_lock); | 1934 | spin_lock(&svsk->sk_lock); |
1929 | clear_bit(SK_DEFERRED, &svsk->sk_flags); | 1935 | clear_bit(SK_DEFERRED, &svsk->sk_flags); |
1930 | if (!list_empty(&svsk->sk_deferred)) { | 1936 | if (!list_empty(&svsk->sk_deferred)) { |
1931 | dr = list_entry(svsk->sk_deferred.next, | 1937 | dr = list_entry(svsk->sk_deferred.next, |
@@ -1934,6 +1940,6 @@ static struct svc_deferred_req *svc_deferred_dequeue(struct svc_sock *svsk) | |||
1934 | list_del_init(&dr->handle.recent); | 1940 | list_del_init(&dr->handle.recent); |
1935 | set_bit(SK_DEFERRED, &svsk->sk_flags); | 1941 | set_bit(SK_DEFERRED, &svsk->sk_flags); |
1936 | } | 1942 | } |
1937 | spin_unlock_bh(&svsk->sk_defer_lock); | 1943 | spin_unlock(&svsk->sk_lock); |
1938 | return dr; | 1944 | return dr; |
1939 | } | 1945 | } |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index aec8cf165e1a..fc12ba51c1fc 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -111,7 +111,6 @@ | |||
111 | #include <net/scm.h> | 111 | #include <net/scm.h> |
112 | #include <linux/init.h> | 112 | #include <linux/init.h> |
113 | #include <linux/poll.h> | 113 | #include <linux/poll.h> |
114 | #include <linux/smp_lock.h> | ||
115 | #include <linux/rtnetlink.h> | 114 | #include <linux/rtnetlink.h> |
116 | #include <linux/mount.h> | 115 | #include <linux/mount.h> |
117 | #include <net/checksum.h> | 116 | #include <net/checksum.h> |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 0d6002fc77b2..479927cb45ca 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -1605,7 +1605,6 @@ static const struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = { | |||
1605 | .sendpage = sock_no_sendpage, | 1605 | .sendpage = sock_no_sendpage, |
1606 | }; | 1606 | }; |
1607 | 1607 | ||
1608 | #include <linux/smp_lock.h> | ||
1609 | SOCKOPS_WRAP(x25_proto, AF_X25); | 1608 | SOCKOPS_WRAP(x25_proto, AF_X25); |
1610 | 1609 | ||
1611 | static struct packet_type x25_packet_type = { | 1610 | static struct packet_type x25_packet_type = { |