aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/Kconfig8
-rw-r--r--net/ipv4/ipconfig.c2
-rw-r--r--net/ipv4/tcp_input.c78
-rw-r--r--net/mac80211/rx.c7
-rw-r--r--net/rfkill/rfkill.c2
-rw-r--r--net/rxrpc/af_rxrpc.c2
-rw-r--r--net/rxrpc/ar-internal.h2
-rw-r--r--net/rxrpc/rxkad.c2
-rw-r--r--net/sched/sch_api.c3
-rw-r--r--net/sunrpc/clnt.c4
-rw-r--r--net/sunrpc/xdr.c9
11 files changed, 72 insertions, 47 deletions
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 9c7e5ffb223d..4670683b4688 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -160,7 +160,7 @@ config IP_PNP_DHCP
160 160
161 If unsure, say Y. Note that if you want to use DHCP, a DHCP server 161 If unsure, say Y. Note that if you want to use DHCP, a DHCP server
162 must be operating on your network. Read 162 must be operating on your network. Read
163 <file:Documentation/nfsroot.txt> for details. 163 <file:Documentation/filesystems/nfsroot.txt> for details.
164 164
165config IP_PNP_BOOTP 165config IP_PNP_BOOTP
166 bool "IP: BOOTP support" 166 bool "IP: BOOTP support"
@@ -175,7 +175,7 @@ config IP_PNP_BOOTP
175 does BOOTP itself, providing all necessary information on the kernel 175 does BOOTP itself, providing all necessary information on the kernel
176 command line, you can say N here. If unsure, say Y. Note that if you 176 command line, you can say N here. If unsure, say Y. Note that if you
177 want to use BOOTP, a BOOTP server must be operating on your network. 177 want to use BOOTP, a BOOTP server must be operating on your network.
178 Read <file:Documentation/nfsroot.txt> for details. 178 Read <file:Documentation/filesystems/nfsroot.txt> for details.
179 179
180config IP_PNP_RARP 180config IP_PNP_RARP
181 bool "IP: RARP support" 181 bool "IP: RARP support"
@@ -187,8 +187,8 @@ config IP_PNP_RARP
187 discovered automatically at boot time using the RARP protocol (an 187 discovered automatically at boot time using the RARP protocol (an
188 older protocol which is being obsoleted by BOOTP and DHCP), say Y 188 older protocol which is being obsoleted by BOOTP and DHCP), say Y
189 here. Note that if you want to use RARP, a RARP server must be 189 here. Note that if you want to use RARP, a RARP server must be
190 operating on your network. Read <file:Documentation/nfsroot.txt> for 190 operating on your network. Read
191 details. 191 <file:Documentation/filesystems/nfsroot.txt> for details.
192 192
193# not yet ready.. 193# not yet ready..
194# bool ' IP: ARP support' CONFIG_IP_PNP_ARP 194# bool ' IP: ARP support' CONFIG_IP_PNP_ARP
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 0b859d46ea74..0f42d1c1f690 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1408,7 +1408,7 @@ late_initcall(ip_auto_config);
1408 1408
1409/* 1409/*
1410 * Decode any IP configuration options in the "ip=" or "nfsaddrs=" kernel 1410 * Decode any IP configuration options in the "ip=" or "nfsaddrs=" kernel
1411 * command line parameter. See Documentation/nfsroot.txt. 1411 * command line parameter. See Documentation/filesystems/nfsroot.txt.
1412 */ 1412 */
1413static int __init ic_proto_name(char *name) 1413static int __init ic_proto_name(char *name)
1414{ 1414{
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 1bdb1bd22134..cdc051bfdb4d 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3854,8 +3854,28 @@ static void tcp_ofo_queue(struct sock *sk)
3854 } 3854 }
3855} 3855}
3856 3856
3857static int tcp_prune_ofo_queue(struct sock *sk);
3857static int tcp_prune_queue(struct sock *sk); 3858static int tcp_prune_queue(struct sock *sk);
3858 3859
3860static inline int tcp_try_rmem_schedule(struct sock *sk, unsigned int size)
3861{
3862 if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
3863 !sk_rmem_schedule(sk, size)) {
3864
3865 if (tcp_prune_queue(sk) < 0)
3866 return -1;
3867
3868 if (!sk_rmem_schedule(sk, size)) {
3869 if (!tcp_prune_ofo_queue(sk))
3870 return -1;
3871
3872 if (!sk_rmem_schedule(sk, size))
3873 return -1;
3874 }
3875 }
3876 return 0;
3877}
3878
3859static void tcp_data_queue(struct sock *sk, struct sk_buff *skb) 3879static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
3860{ 3880{
3861 struct tcphdr *th = tcp_hdr(skb); 3881 struct tcphdr *th = tcp_hdr(skb);
@@ -3905,12 +3925,9 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
3905 if (eaten <= 0) { 3925 if (eaten <= 0) {
3906queue_and_out: 3926queue_and_out:
3907 if (eaten < 0 && 3927 if (eaten < 0 &&
3908 (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || 3928 tcp_try_rmem_schedule(sk, skb->truesize))
3909 !sk_rmem_schedule(sk, skb->truesize))) { 3929 goto drop;
3910 if (tcp_prune_queue(sk) < 0 || 3930
3911 !sk_rmem_schedule(sk, skb->truesize))
3912 goto drop;
3913 }
3914 skb_set_owner_r(skb, sk); 3931 skb_set_owner_r(skb, sk);
3915 __skb_queue_tail(&sk->sk_receive_queue, skb); 3932 __skb_queue_tail(&sk->sk_receive_queue, skb);
3916 } 3933 }
@@ -3979,12 +3996,8 @@ drop:
3979 3996
3980 TCP_ECN_check_ce(tp, skb); 3997 TCP_ECN_check_ce(tp, skb);
3981 3998
3982 if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || 3999 if (tcp_try_rmem_schedule(sk, skb->truesize))
3983 !sk_rmem_schedule(sk, skb->truesize)) { 4000 goto drop;
3984 if (tcp_prune_queue(sk) < 0 ||
3985 !sk_rmem_schedule(sk, skb->truesize))
3986 goto drop;
3987 }
3988 4001
3989 /* Disable header prediction. */ 4002 /* Disable header prediction. */
3990 tp->pred_flags = 0; 4003 tp->pred_flags = 0;
@@ -4211,6 +4224,32 @@ static void tcp_collapse_ofo_queue(struct sock *sk)
4211 } 4224 }
4212} 4225}
4213 4226
4227/*
4228 * Purge the out-of-order queue.
4229 * Return true if queue was pruned.
4230 */
4231static int tcp_prune_ofo_queue(struct sock *sk)
4232{
4233 struct tcp_sock *tp = tcp_sk(sk);
4234 int res = 0;
4235
4236 if (!skb_queue_empty(&tp->out_of_order_queue)) {
4237 NET_INC_STATS_BH(LINUX_MIB_OFOPRUNED);
4238 __skb_queue_purge(&tp->out_of_order_queue);
4239
4240 /* Reset SACK state. A conforming SACK implementation will
4241 * do the same at a timeout based retransmit. When a connection
4242 * is in a sad state like this, we care only about integrity
4243 * of the connection not performance.
4244 */
4245 if (tp->rx_opt.sack_ok)
4246 tcp_sack_reset(&tp->rx_opt);
4247 sk_mem_reclaim(sk);
4248 res = 1;
4249 }
4250 return res;
4251}
4252
4214/* Reduce allocated memory if we can, trying to get 4253/* Reduce allocated memory if we can, trying to get
4215 * the socket within its memory limits again. 4254 * the socket within its memory limits again.
4216 * 4255 *
@@ -4244,20 +4283,7 @@ static int tcp_prune_queue(struct sock *sk)
4244 /* Collapsing did not help, destructive actions follow. 4283 /* Collapsing did not help, destructive actions follow.
4245 * This must not ever occur. */ 4284 * This must not ever occur. */
4246 4285
4247 /* First, purge the out_of_order queue. */ 4286 tcp_prune_ofo_queue(sk);
4248 if (!skb_queue_empty(&tp->out_of_order_queue)) {
4249 NET_INC_STATS_BH(LINUX_MIB_OFOPRUNED);
4250 __skb_queue_purge(&tp->out_of_order_queue);
4251
4252 /* Reset SACK state. A conforming SACK implementation will
4253 * do the same at a timeout based retransmit. When a connection
4254 * is in a sad state like this, we care only about integrity
4255 * of the connection not performance.
4256 */
4257 if (tcp_is_sack(tp))
4258 tcp_sack_reset(&tp->rx_opt);
4259 sk_mem_reclaim(sk);
4260 }
4261 4287
4262 if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) 4288 if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf)
4263 return 0; 4289 return 0;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 306eadb01fc4..52e4554fdde7 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1077,12 +1077,9 @@ ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx)
1077 if (unlikely(!(rx->fc & IEEE80211_FCTL_PROTECTED) && 1077 if (unlikely(!(rx->fc & IEEE80211_FCTL_PROTECTED) &&
1078 (rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && 1078 (rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA &&
1079 (rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_NULLFUNC && 1079 (rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_NULLFUNC &&
1080 (rx->key || rx->sdata->drop_unencrypted))) { 1080 (rx->key || rx->sdata->drop_unencrypted)))
1081 if (net_ratelimit())
1082 printk(KERN_DEBUG "%s: RX non-WEP frame, but expected "
1083 "encryption\n", rx->dev->name);
1084 return -EACCES; 1081 return -EACCES;
1085 } 1082
1086 return 0; 1083 return 0;
1087} 1084}
1088 1085
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index 140a0a8c6b02..4e10a95de832 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -92,7 +92,7 @@ void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state)
92 rfkill_states[type] = state; 92 rfkill_states[type] = state;
93 93
94 list_for_each_entry(rfkill, &rfkill_list, node) { 94 list_for_each_entry(rfkill, &rfkill_list, node) {
95 if (!rfkill->user_claim) 95 if ((!rfkill->user_claim) && (rfkill->type == type))
96 rfkill_toggle_radio(rfkill, state); 96 rfkill_toggle_radio(rfkill, state);
97 } 97 }
98 98
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index 2d0c29c837f7..4b2682feeedc 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -27,7 +27,7 @@ MODULE_ALIAS_NETPROTO(PF_RXRPC);
27 27
28unsigned rxrpc_debug; // = RXRPC_DEBUG_KPROTO; 28unsigned rxrpc_debug; // = RXRPC_DEBUG_KPROTO;
29module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO); 29module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO);
30MODULE_PARM_DESC(rxrpc_debug, "RxRPC debugging mask"); 30MODULE_PARM_DESC(debug, "RxRPC debugging mask");
31 31
32static int sysctl_rxrpc_max_qlen __read_mostly = 10; 32static int sysctl_rxrpc_max_qlen __read_mostly = 10;
33 33
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index c89b797b221d..3e7318c1343c 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -611,7 +611,7 @@ extern struct rxrpc_transport *rxrpc_find_transport(struct rxrpc_local *,
611extern unsigned rxrpc_debug; 611extern unsigned rxrpc_debug;
612 612
613#define dbgprintk(FMT,...) \ 613#define dbgprintk(FMT,...) \
614 printk("[%x%-6.6s] "FMT"\n", smp_processor_id(), current->comm ,##__VA_ARGS__) 614 printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__)
615 615
616/* make sure we maintain the format strings, even when debugging is disabled */ 616/* make sure we maintain the format strings, even when debugging is disabled */
617static inline __attribute__((format(printf,1,2))) 617static inline __attribute__((format(printf,1,2)))
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index d1c296f2d617..6d38a81b336d 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -31,7 +31,7 @@
31 31
32unsigned rxrpc_debug; 32unsigned rxrpc_debug;
33module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO); 33module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO);
34MODULE_PARM_DESC(rxrpc_debug, "rxkad debugging mask"); 34MODULE_PARM_DESC(debug, "rxkad debugging mask");
35 35
36struct rxkad_level1_hdr { 36struct rxkad_level1_hdr {
37 __be32 data_size; /* true data size (excluding padding) */ 37 __be32 data_size; /* true data size (excluding padding) */
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 15b91a9ee8e8..c40773cdbe45 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -386,6 +386,9 @@ void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n)
386 if (n == 0) 386 if (n == 0)
387 return; 387 return;
388 while ((parentid = sch->parent)) { 388 while ((parentid = sch->parent)) {
389 if (TC_H_MAJ(parentid) == TC_H_MAJ(TC_H_INGRESS))
390 return;
391
389 sch = qdisc_lookup(sch->dev, TC_H_MAJ(parentid)); 392 sch = qdisc_lookup(sch->dev, TC_H_MAJ(parentid));
390 if (sch == NULL) { 393 if (sch == NULL) {
391 WARN_ON(parentid != TC_H_ROOT); 394 WARN_ON(parentid != TC_H_ROOT);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 13a3718e7cc9..7b96ff38002f 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -261,10 +261,6 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args)
261 }; 261 };
262 char servername[48]; 262 char servername[48];
263 263
264 xprt = xprt_create_transport(&xprtargs);
265 if (IS_ERR(xprt))
266 return (struct rpc_clnt *)xprt;
267
268 /* 264 /*
269 * If the caller chooses not to specify a hostname, whip 265 * If the caller chooses not to specify a hostname, whip
270 * up a string representation of the passed-in address. 266 * up a string representation of the passed-in address.
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 995c3fdc16c2..79a55d56cc98 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -244,7 +244,7 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
244 pgto = pages + (pgbase >> PAGE_CACHE_SHIFT); 244 pgto = pages + (pgbase >> PAGE_CACHE_SHIFT);
245 pgbase &= ~PAGE_CACHE_MASK; 245 pgbase &= ~PAGE_CACHE_MASK;
246 246
247 do { 247 for (;;) {
248 copy = PAGE_CACHE_SIZE - pgbase; 248 copy = PAGE_CACHE_SIZE - pgbase;
249 if (copy > len) 249 if (copy > len)
250 copy = len; 250 copy = len;
@@ -253,6 +253,10 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
253 memcpy(vto + pgbase, p, copy); 253 memcpy(vto + pgbase, p, copy);
254 kunmap_atomic(vto, KM_USER0); 254 kunmap_atomic(vto, KM_USER0);
255 255
256 len -= copy;
257 if (len == 0)
258 break;
259
256 pgbase += copy; 260 pgbase += copy;
257 if (pgbase == PAGE_CACHE_SIZE) { 261 if (pgbase == PAGE_CACHE_SIZE) {
258 flush_dcache_page(*pgto); 262 flush_dcache_page(*pgto);
@@ -260,8 +264,7 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
260 pgto++; 264 pgto++;
261 } 265 }
262 p += copy; 266 p += copy;
263 267 }
264 } while ((len -= copy) != 0);
265 flush_dcache_page(*pgto); 268 flush_dcache_page(*pgto);
266} 269}
267 270