diff options
Diffstat (limited to 'net')
35 files changed, 150 insertions, 110 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index c421a1f8f0b9..fca23a3bf12c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -454,7 +454,7 @@ static int netdev_boot_setup_add(char *name, struct ifmap *map) | |||
454 | for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { | 454 | for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { |
455 | if (s[i].name[0] == '\0' || s[i].name[0] == ' ') { | 455 | if (s[i].name[0] == '\0' || s[i].name[0] == ' ') { |
456 | memset(s[i].name, 0, sizeof(s[i].name)); | 456 | memset(s[i].name, 0, sizeof(s[i].name)); |
457 | strcpy(s[i].name, name); | 457 | strlcpy(s[i].name, name, IFNAMSIZ); |
458 | memcpy(&s[i].map, map, sizeof(s[i].map)); | 458 | memcpy(&s[i].map, map, sizeof(s[i].map)); |
459 | break; | 459 | break; |
460 | } | 460 | } |
@@ -479,7 +479,7 @@ int netdev_boot_setup_check(struct net_device *dev) | |||
479 | 479 | ||
480 | for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { | 480 | for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { |
481 | if (s[i].name[0] != '\0' && s[i].name[0] != ' ' && | 481 | if (s[i].name[0] != '\0' && s[i].name[0] != ' ' && |
482 | !strncmp(dev->name, s[i].name, strlen(s[i].name))) { | 482 | !strcmp(dev->name, s[i].name)) { |
483 | dev->irq = s[i].map.irq; | 483 | dev->irq = s[i].map.irq; |
484 | dev->base_addr = s[i].map.base_addr; | 484 | dev->base_addr = s[i].map.base_addr; |
485 | dev->mem_start = s[i].map.mem_start; | 485 | dev->mem_start = s[i].map.mem_start; |
@@ -2973,7 +2973,7 @@ EXPORT_SYMBOL(dev_unicast_delete); | |||
2973 | /** | 2973 | /** |
2974 | * dev_unicast_add - add a secondary unicast address | 2974 | * dev_unicast_add - add a secondary unicast address |
2975 | * @dev: device | 2975 | * @dev: device |
2976 | * @addr: address to delete | 2976 | * @addr: address to add |
2977 | * @alen: length of @addr | 2977 | * @alen: length of @addr |
2978 | * | 2978 | * |
2979 | * Add a secondary unicast address to the device or increase | 2979 | * Add a secondary unicast address to the device or increase |
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index e3e9ab0f74e3..277a2302eb3a 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -226,7 +226,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
226 | 226 | ||
227 | ops = lookup_rules_ops(net, frh->family); | 227 | ops = lookup_rules_ops(net, frh->family); |
228 | if (ops == NULL) { | 228 | if (ops == NULL) { |
229 | err = EAFNOSUPPORT; | 229 | err = -EAFNOSUPPORT; |
230 | goto errout; | 230 | goto errout; |
231 | } | 231 | } |
232 | 232 | ||
@@ -365,7 +365,7 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
365 | 365 | ||
366 | ops = lookup_rules_ops(net, frh->family); | 366 | ops = lookup_rules_ops(net, frh->family); |
367 | if (ops == NULL) { | 367 | if (ops == NULL) { |
368 | err = EAFNOSUPPORT; | 368 | err = -EAFNOSUPPORT; |
369 | goto errout; | 369 | goto errout; |
370 | } | 370 | } |
371 | 371 | ||
diff --git a/net/core/filter.c b/net/core/filter.c index 4f8369729a4e..df3744355839 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -68,7 +68,6 @@ static inline void *load_pointer(struct sk_buff *skb, int k, | |||
68 | * sk_filter - run a packet through a socket filter | 68 | * sk_filter - run a packet through a socket filter |
69 | * @sk: sock associated with &sk_buff | 69 | * @sk: sock associated with &sk_buff |
70 | * @skb: buffer to filter | 70 | * @skb: buffer to filter |
71 | * @needlock: set to 1 if the sock is not locked by caller. | ||
72 | * | 71 | * |
73 | * Run the filter code and then cut skb->data to correct size returned by | 72 | * Run the filter code and then cut skb->data to correct size returned by |
74 | * sk_run_filter. If pkt_len is 0 we toss packet. If skb->len is smaller | 73 | * sk_run_filter. If pkt_len is 0 we toss packet. If skb->len is smaller |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1e556d312117..366621610e76 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -1292,12 +1292,14 @@ static int __skb_splice_bits(struct sk_buff *skb, unsigned int *offset, | |||
1292 | { | 1292 | { |
1293 | unsigned int nr_pages = spd->nr_pages; | 1293 | unsigned int nr_pages = spd->nr_pages; |
1294 | unsigned int poff, plen, len, toff, tlen; | 1294 | unsigned int poff, plen, len, toff, tlen; |
1295 | int headlen, seg; | 1295 | int headlen, seg, error = 0; |
1296 | 1296 | ||
1297 | toff = *offset; | 1297 | toff = *offset; |
1298 | tlen = *total_len; | 1298 | tlen = *total_len; |
1299 | if (!tlen) | 1299 | if (!tlen) { |
1300 | error = 1; | ||
1300 | goto err; | 1301 | goto err; |
1302 | } | ||
1301 | 1303 | ||
1302 | /* | 1304 | /* |
1303 | * if the offset is greater than the linear part, go directly to | 1305 | * if the offset is greater than the linear part, go directly to |
@@ -1339,7 +1341,8 @@ static int __skb_splice_bits(struct sk_buff *skb, unsigned int *offset, | |||
1339 | * just jump directly to update and return, no point | 1341 | * just jump directly to update and return, no point |
1340 | * in going over fragments when the output is full. | 1342 | * in going over fragments when the output is full. |
1341 | */ | 1343 | */ |
1342 | if (spd_fill_page(spd, virt_to_page(p), plen, poff, skb)) | 1344 | error = spd_fill_page(spd, virt_to_page(p), plen, poff, skb); |
1345 | if (error) | ||
1343 | goto done; | 1346 | goto done; |
1344 | 1347 | ||
1345 | tlen -= plen; | 1348 | tlen -= plen; |
@@ -1369,7 +1372,8 @@ map_frag: | |||
1369 | if (!plen) | 1372 | if (!plen) |
1370 | break; | 1373 | break; |
1371 | 1374 | ||
1372 | if (spd_fill_page(spd, f->page, plen, poff, skb)) | 1375 | error = spd_fill_page(spd, f->page, plen, poff, skb); |
1376 | if (error) | ||
1373 | break; | 1377 | break; |
1374 | 1378 | ||
1375 | tlen -= plen; | 1379 | tlen -= plen; |
@@ -1382,7 +1386,10 @@ done: | |||
1382 | return 0; | 1386 | return 0; |
1383 | } | 1387 | } |
1384 | err: | 1388 | err: |
1385 | return 1; | 1389 | /* update the offset to reflect the linear part skip, if any */ |
1390 | if (!error) | ||
1391 | *offset = toff; | ||
1392 | return error; | ||
1386 | } | 1393 | } |
1387 | 1394 | ||
1388 | /* | 1395 | /* |
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 4ed429bd5951..0546a0bc97ea 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
@@ -192,14 +192,21 @@ EXPORT_SYMBOL(inet_frag_evictor); | |||
192 | 192 | ||
193 | static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, | 193 | static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, |
194 | struct inet_frag_queue *qp_in, struct inet_frags *f, | 194 | struct inet_frag_queue *qp_in, struct inet_frags *f, |
195 | unsigned int hash, void *arg) | 195 | void *arg) |
196 | { | 196 | { |
197 | struct inet_frag_queue *qp; | 197 | struct inet_frag_queue *qp; |
198 | #ifdef CONFIG_SMP | 198 | #ifdef CONFIG_SMP |
199 | struct hlist_node *n; | 199 | struct hlist_node *n; |
200 | #endif | 200 | #endif |
201 | unsigned int hash; | ||
201 | 202 | ||
202 | write_lock(&f->lock); | 203 | write_lock(&f->lock); |
204 | /* | ||
205 | * While we stayed w/o the lock other CPU could update | ||
206 | * the rnd seed, so we need to re-calculate the hash | ||
207 | * chain. Fortunatelly the qp_in can be used to get one. | ||
208 | */ | ||
209 | hash = f->hashfn(qp_in); | ||
203 | #ifdef CONFIG_SMP | 210 | #ifdef CONFIG_SMP |
204 | /* With SMP race we have to recheck hash table, because | 211 | /* With SMP race we have to recheck hash table, because |
205 | * such entry could be created on other cpu, while we | 212 | * such entry could be created on other cpu, while we |
@@ -247,7 +254,7 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf, | |||
247 | } | 254 | } |
248 | 255 | ||
249 | static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf, | 256 | static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf, |
250 | struct inet_frags *f, void *arg, unsigned int hash) | 257 | struct inet_frags *f, void *arg) |
251 | { | 258 | { |
252 | struct inet_frag_queue *q; | 259 | struct inet_frag_queue *q; |
253 | 260 | ||
@@ -255,7 +262,7 @@ static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf, | |||
255 | if (q == NULL) | 262 | if (q == NULL) |
256 | return NULL; | 263 | return NULL; |
257 | 264 | ||
258 | return inet_frag_intern(nf, q, f, hash, arg); | 265 | return inet_frag_intern(nf, q, f, arg); |
259 | } | 266 | } |
260 | 267 | ||
261 | struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, | 268 | struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, |
@@ -264,7 +271,6 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, | |||
264 | struct inet_frag_queue *q; | 271 | struct inet_frag_queue *q; |
265 | struct hlist_node *n; | 272 | struct hlist_node *n; |
266 | 273 | ||
267 | read_lock(&f->lock); | ||
268 | hlist_for_each_entry(q, n, &f->hash[hash], list) { | 274 | hlist_for_each_entry(q, n, &f->hash[hash], list) { |
269 | if (q->net == nf && f->match(q, key)) { | 275 | if (q->net == nf && f->match(q, key)) { |
270 | atomic_inc(&q->refcnt); | 276 | atomic_inc(&q->refcnt); |
@@ -274,6 +280,6 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, | |||
274 | } | 280 | } |
275 | read_unlock(&f->lock); | 281 | read_unlock(&f->lock); |
276 | 282 | ||
277 | return inet_frag_create(nf, f, key, hash); | 283 | return inet_frag_create(nf, f, key); |
278 | } | 284 | } |
279 | EXPORT_SYMBOL(inet_frag_find); | 285 | EXPORT_SYMBOL(inet_frag_find); |
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c index 4a4d49fca1f2..cfd034a2b96e 100644 --- a/net/ipv4/inet_lro.c +++ b/net/ipv4/inet_lro.c | |||
@@ -383,8 +383,7 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, | |||
383 | out2: /* send aggregated SKBs to stack */ | 383 | out2: /* send aggregated SKBs to stack */ |
384 | lro_flush(lro_mgr, lro_desc); | 384 | lro_flush(lro_mgr, lro_desc); |
385 | 385 | ||
386 | out: /* Original SKB has to be posted to stack */ | 386 | out: |
387 | skb->ip_summed = lro_mgr->ip_summed; | ||
388 | return 1; | 387 | return 1; |
389 | } | 388 | } |
390 | 389 | ||
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index cd6ce6ac6358..37221f659159 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -229,6 +229,8 @@ static inline struct ipq *ip_find(struct net *net, struct iphdr *iph, u32 user) | |||
229 | 229 | ||
230 | arg.iph = iph; | 230 | arg.iph = iph; |
231 | arg.user = user; | 231 | arg.user = user; |
232 | |||
233 | read_lock(&ip4_frags.lock); | ||
232 | hash = ipqhashfn(iph->id, iph->saddr, iph->daddr, iph->protocol); | 234 | hash = ipqhashfn(iph->id, iph->saddr, iph->daddr, iph->protocol); |
233 | 235 | ||
234 | q = inet_frag_find(&net->ipv4.frags, &ip4_frags, &arg, hash); | 236 | q = inet_frag_find(&net->ipv4.frags, &ip4_frags, &arg, hash); |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index fc54a48fde1e..850825dc86e6 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -260,6 +260,8 @@ | |||
260 | #include <linux/socket.h> | 260 | #include <linux/socket.h> |
261 | #include <linux/random.h> | 261 | #include <linux/random.h> |
262 | #include <linux/bootmem.h> | 262 | #include <linux/bootmem.h> |
263 | #include <linux/highmem.h> | ||
264 | #include <linux/swap.h> | ||
263 | #include <linux/cache.h> | 265 | #include <linux/cache.h> |
264 | #include <linux/err.h> | 266 | #include <linux/err.h> |
265 | #include <linux/crypto.h> | 267 | #include <linux/crypto.h> |
@@ -2620,7 +2622,7 @@ __setup("thash_entries=", set_thash_entries); | |||
2620 | void __init tcp_init(void) | 2622 | void __init tcp_init(void) |
2621 | { | 2623 | { |
2622 | struct sk_buff *skb = NULL; | 2624 | struct sk_buff *skb = NULL; |
2623 | unsigned long limit; | 2625 | unsigned long nr_pages, limit; |
2624 | int order, i, max_share; | 2626 | int order, i, max_share; |
2625 | 2627 | ||
2626 | BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb)); | 2628 | BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb)); |
@@ -2689,8 +2691,9 @@ void __init tcp_init(void) | |||
2689 | * is up to 1/2 at 256 MB, decreasing toward zero with the amount of | 2691 | * is up to 1/2 at 256 MB, decreasing toward zero with the amount of |
2690 | * memory, with a floor of 128 pages. | 2692 | * memory, with a floor of 128 pages. |
2691 | */ | 2693 | */ |
2692 | limit = min(nr_all_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT); | 2694 | nr_pages = totalram_pages - totalhigh_pages; |
2693 | limit = (limit * (nr_all_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11); | 2695 | limit = min(nr_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT); |
2696 | limit = (limit * (nr_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11); | ||
2694 | limit = max(limit, 128UL); | 2697 | limit = max(limit, 128UL); |
2695 | sysctl_tcp_mem[0] = limit / 4 * 3; | 2698 | sysctl_tcp_mem[0] = limit / 4 * 3; |
2696 | sysctl_tcp_mem[1] = limit; | 2699 | sysctl_tcp_mem[1] = limit; |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 12695be2c255..ffe869ac1bcf 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -2291,7 +2291,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len) | |||
2291 | } | 2291 | } |
2292 | 2292 | ||
2293 | seq_printf(f, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX " | 2293 | seq_printf(f, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX " |
2294 | "%08X %5d %8d %lu %d %p %u %u %u %u %d%n", | 2294 | "%08X %5d %8d %lu %d %p %lu %lu %u %u %d%n", |
2295 | i, src, srcp, dest, destp, sk->sk_state, | 2295 | i, src, srcp, dest, destp, sk->sk_state, |
2296 | tp->write_seq - tp->snd_una, | 2296 | tp->write_seq - tp->snd_una, |
2297 | sk->sk_state == TCP_LISTEN ? sk->sk_ack_backlog : | 2297 | sk->sk_state == TCP_LISTEN ? sk->sk_ack_backlog : |
@@ -2303,8 +2303,8 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len) | |||
2303 | icsk->icsk_probes_out, | 2303 | icsk->icsk_probes_out, |
2304 | sock_i_ino(sk), | 2304 | sock_i_ino(sk), |
2305 | atomic_read(&sk->sk_refcnt), sk, | 2305 | atomic_read(&sk->sk_refcnt), sk, |
2306 | icsk->icsk_rto, | 2306 | jiffies_to_clock_t(icsk->icsk_rto), |
2307 | icsk->icsk_ack.ato, | 2307 | jiffies_to_clock_t(icsk->icsk_ack.ato), |
2308 | (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong, | 2308 | (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong, |
2309 | tp->snd_cwnd, | 2309 | tp->snd_cwnd, |
2310 | tp->snd_ssthresh >= 0xFFFF ? -1 : tp->snd_ssthresh, | 2310 | tp->snd_ssthresh >= 0xFFFF ? -1 : tp->snd_ssthresh, |
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c index 27a5e8b48d93..f405cea21a8b 100644 --- a/net/ipv6/netfilter/ip6table_mangle.c +++ b/net/ipv6/netfilter/ip6table_mangle.c | |||
@@ -129,7 +129,7 @@ static struct nf_hook_ops ip6t_ops[] __read_mostly = { | |||
129 | .priority = NF_IP6_PRI_MANGLE, | 129 | .priority = NF_IP6_PRI_MANGLE, |
130 | }, | 130 | }, |
131 | { | 131 | { |
132 | .hook = ip6t_local_hook, | 132 | .hook = ip6t_route_hook, |
133 | .owner = THIS_MODULE, | 133 | .owner = THIS_MODULE, |
134 | .pf = PF_INET6, | 134 | .pf = PF_INET6, |
135 | .hooknum = NF_INET_LOCAL_IN, | 135 | .hooknum = NF_INET_LOCAL_IN, |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index e65e26e210ee..cf20bc4fd60d 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -207,9 +207,10 @@ fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst) | |||
207 | arg.id = id; | 207 | arg.id = id; |
208 | arg.src = src; | 208 | arg.src = src; |
209 | arg.dst = dst; | 209 | arg.dst = dst; |
210 | |||
211 | read_lock_bh(&nf_frags.lock); | ||
210 | hash = ip6qhashfn(id, src, dst); | 212 | hash = ip6qhashfn(id, src, dst); |
211 | 213 | ||
212 | local_bh_disable(); | ||
213 | q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash); | 214 | q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash); |
214 | local_bh_enable(); | 215 | local_bh_enable(); |
215 | if (q == NULL) | 216 | if (q == NULL) |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 798cabc7535b..a60d7d129713 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -247,6 +247,8 @@ fq_find(struct net *net, __be32 id, struct in6_addr *src, struct in6_addr *dst, | |||
247 | arg.id = id; | 247 | arg.id = id; |
248 | arg.src = src; | 248 | arg.src = src; |
249 | arg.dst = dst; | 249 | arg.dst = dst; |
250 | |||
251 | read_lock(&ip6_frags.lock); | ||
250 | hash = ip6qhashfn(id, src, dst); | 252 | hash = ip6qhashfn(id, src, dst); |
251 | 253 | ||
252 | q = inet_frag_find(&net->ipv6.frags, &ip6_frags, &arg, hash); | 254 | q = inet_frag_find(&net->ipv6.frags, &ip6_frags, &arg, hash); |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d1f3e19b06c7..7ff687020fa9 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -240,7 +240,7 @@ static inline int rt6_need_strict(struct in6_addr *daddr) | |||
240 | static inline struct rt6_info *rt6_device_match(struct net *net, | 240 | static inline struct rt6_info *rt6_device_match(struct net *net, |
241 | struct rt6_info *rt, | 241 | struct rt6_info *rt, |
242 | int oif, | 242 | int oif, |
243 | int strict) | 243 | int flags) |
244 | { | 244 | { |
245 | struct rt6_info *local = NULL; | 245 | struct rt6_info *local = NULL; |
246 | struct rt6_info *sprt; | 246 | struct rt6_info *sprt; |
@@ -253,7 +253,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net, | |||
253 | if (dev->flags & IFF_LOOPBACK) { | 253 | if (dev->flags & IFF_LOOPBACK) { |
254 | if (sprt->rt6i_idev == NULL || | 254 | if (sprt->rt6i_idev == NULL || |
255 | sprt->rt6i_idev->dev->ifindex != oif) { | 255 | sprt->rt6i_idev->dev->ifindex != oif) { |
256 | if (strict && oif) | 256 | if (flags & RT6_LOOKUP_F_IFACE && oif) |
257 | continue; | 257 | continue; |
258 | if (local && (!oif || | 258 | if (local && (!oif || |
259 | local->rt6i_idev->dev->ifindex == oif)) | 259 | local->rt6i_idev->dev->ifindex == oif)) |
@@ -266,7 +266,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net, | |||
266 | if (local) | 266 | if (local) |
267 | return local; | 267 | return local; |
268 | 268 | ||
269 | if (strict) | 269 | if (flags & RT6_LOOKUP_F_IFACE) |
270 | return net->ipv6.ip6_null_entry; | 270 | return net->ipv6.ip6_null_entry; |
271 | } | 271 | } |
272 | return rt; | 272 | return rt; |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index cb46749d4c32..40ea9c36d24b 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -2036,7 +2036,7 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) | |||
2036 | 2036 | ||
2037 | seq_printf(seq, | 2037 | seq_printf(seq, |
2038 | "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X " | 2038 | "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X " |
2039 | "%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %u %u %u %u %d\n", | 2039 | "%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %lu %lu %u %u %d\n", |
2040 | i, | 2040 | i, |
2041 | src->s6_addr32[0], src->s6_addr32[1], | 2041 | src->s6_addr32[0], src->s6_addr32[1], |
2042 | src->s6_addr32[2], src->s6_addr32[3], srcp, | 2042 | src->s6_addr32[2], src->s6_addr32[3], srcp, |
@@ -2052,8 +2052,8 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) | |||
2052 | icsk->icsk_probes_out, | 2052 | icsk->icsk_probes_out, |
2053 | sock_i_ino(sp), | 2053 | sock_i_ino(sp), |
2054 | atomic_read(&sp->sk_refcnt), sp, | 2054 | atomic_read(&sp->sk_refcnt), sp, |
2055 | icsk->icsk_rto, | 2055 | jiffies_to_clock_t(icsk->icsk_rto), |
2056 | icsk->icsk_ack.ato, | 2056 | jiffies_to_clock_t(icsk->icsk_ack.ato), |
2057 | (icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong, | 2057 | (icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong, |
2058 | tp->snd_cwnd, tp->snd_ssthresh>=0xFFFF?-1:tp->snd_ssthresh | 2058 | tp->snd_cwnd, tp->snd_ssthresh>=0xFFFF?-1:tp->snd_ssthresh |
2059 | ); | 2059 | ); |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 150d66dbda9d..220e83be3ef4 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -380,6 +380,15 @@ void ieee80211_key_free(struct ieee80211_key *key) | |||
380 | if (!key) | 380 | if (!key) |
381 | return; | 381 | return; |
382 | 382 | ||
383 | if (!key->sdata) { | ||
384 | /* The key has not been linked yet, simply free it | ||
385 | * and don't Oops */ | ||
386 | if (key->conf.alg == ALG_CCMP) | ||
387 | ieee80211_aes_key_free(key->u.ccmp.tfm); | ||
388 | kfree(key); | ||
389 | return; | ||
390 | } | ||
391 | |||
383 | spin_lock_irqsave(&key->sdata->local->key_lock, flags); | 392 | spin_lock_irqsave(&key->sdata->local->key_lock, flags); |
384 | __ieee80211_key_free(key); | 393 | __ieee80211_key_free(key); |
385 | spin_unlock_irqrestore(&key->sdata->local->key_lock, flags); | 394 | spin_unlock_irqrestore(&key->sdata->local->key_lock, flags); |
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 6106cb79060c..e8404212ad57 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -95,6 +95,13 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr, | |||
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
98 | if (alg == ALG_WEP && | ||
99 | key_len != LEN_WEP40 && key_len != LEN_WEP104) { | ||
100 | ieee80211_key_free(key); | ||
101 | err = -EINVAL; | ||
102 | goto out_unlock; | ||
103 | } | ||
104 | |||
98 | ieee80211_key_link(key, sdata, sta); | 105 | ieee80211_key_link(key, sdata, sta); |
99 | 106 | ||
100 | if (set_tx_key || (!sta && !sdata->default_key && key)) | 107 | if (set_tx_key || (!sta && !sdata->default_key && key)) |
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 635b996c8c35..5d09e8698b57 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -323,8 +323,7 @@ static void wme_qdiscop_destroy(struct Qdisc* qd) | |||
323 | struct ieee80211_hw *hw = &local->hw; | 323 | struct ieee80211_hw *hw = &local->hw; |
324 | int queue; | 324 | int queue; |
325 | 325 | ||
326 | tcf_destroy_chain(q->filter_list); | 326 | tcf_destroy_chain(&q->filter_list); |
327 | q->filter_list = NULL; | ||
328 | 327 | ||
329 | for (queue=0; queue < hw->queues; queue++) { | 328 | for (queue=0; queue < hw->queues; queue++) { |
330 | skb_queue_purge(&q->requeued[queue]); | 329 | skb_queue_purge(&q->requeued[queue]); |
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index ba94004fe323..271cd01d57ae 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -331,12 +331,13 @@ static unsigned int get_conntrack_index(const struct tcphdr *tcph) | |||
331 | 331 | ||
332 | I. Upper bound for valid data: seq <= sender.td_maxend | 332 | I. Upper bound for valid data: seq <= sender.td_maxend |
333 | II. Lower bound for valid data: seq + len >= sender.td_end - receiver.td_maxwin | 333 | II. Lower bound for valid data: seq + len >= sender.td_end - receiver.td_maxwin |
334 | III. Upper bound for valid ack: sack <= receiver.td_end | 334 | III. Upper bound for valid (s)ack: sack <= receiver.td_end |
335 | IV. Lower bound for valid ack: ack >= receiver.td_end - MAXACKWINDOW | 335 | IV. Lower bound for valid (s)ack: sack >= receiver.td_end - MAXACKWINDOW |
336 | 336 | ||
337 | where sack is the highest right edge of sack block found in the packet. | 337 | where sack is the highest right edge of sack block found in the packet |
338 | or ack in the case of packet without SACK option. | ||
338 | 339 | ||
339 | The upper bound limit for a valid ack is not ignored - | 340 | The upper bound limit for a valid (s)ack is not ignored - |
340 | we doesn't have to deal with fragments. | 341 | we doesn't have to deal with fragments. |
341 | */ | 342 | */ |
342 | 343 | ||
@@ -606,12 +607,12 @@ static bool tcp_in_window(const struct nf_conn *ct, | |||
606 | before(seq, sender->td_maxend + 1), | 607 | before(seq, sender->td_maxend + 1), |
607 | after(end, sender->td_end - receiver->td_maxwin - 1), | 608 | after(end, sender->td_end - receiver->td_maxwin - 1), |
608 | before(sack, receiver->td_end + 1), | 609 | before(sack, receiver->td_end + 1), |
609 | after(ack, receiver->td_end - MAXACKWINDOW(sender))); | 610 | after(sack, receiver->td_end - MAXACKWINDOW(sender) - 1)); |
610 | 611 | ||
611 | if (before(seq, sender->td_maxend + 1) && | 612 | if (before(seq, sender->td_maxend + 1) && |
612 | after(end, sender->td_end - receiver->td_maxwin - 1) && | 613 | after(end, sender->td_end - receiver->td_maxwin - 1) && |
613 | before(sack, receiver->td_end + 1) && | 614 | before(sack, receiver->td_end + 1) && |
614 | after(ack, receiver->td_end - MAXACKWINDOW(sender))) { | 615 | after(sack, receiver->td_end - MAXACKWINDOW(sender) - 1)) { |
615 | /* | 616 | /* |
616 | * Take into account window scaling (RFC 1323). | 617 | * Take into account window scaling (RFC 1323). |
617 | */ | 618 | */ |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 0099da5b2591..52b2611a6eb6 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -1534,7 +1534,7 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb, | |||
1534 | } | 1534 | } |
1535 | } | 1535 | } |
1536 | list_for_each_entry_rcu(addr6, &iface->addr6_list, list) { | 1536 | list_for_each_entry_rcu(addr6, &iface->addr6_list, list) { |
1537 | if (addr6->valid || iter_addr6++ < skip_addr6) | 1537 | if (!addr6->valid || iter_addr6++ < skip_addr6) |
1538 | continue; | 1538 | continue; |
1539 | if (netlbl_unlabel_staticlist_gen(NLBL_UNLABEL_C_STATICLISTDEF, | 1539 | if (netlbl_unlabel_staticlist_gen(NLBL_UNLABEL_C_STATICLISTDEF, |
1540 | iface, | 1540 | iface, |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 9b97f8006c9c..349aba189558 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -886,7 +886,7 @@ retry: | |||
886 | return netlink_unicast_kernel(sk, skb); | 886 | return netlink_unicast_kernel(sk, skb); |
887 | 887 | ||
888 | if (sk_filter(sk, skb)) { | 888 | if (sk_filter(sk, skb)) { |
889 | int err = skb->len; | 889 | err = skb->len; |
890 | kfree_skb(skb); | 890 | kfree_skb(skb); |
891 | sock_put(sk); | 891 | sock_put(sk); |
892 | return err; | 892 | return err; |
diff --git a/net/netlink/attr.c b/net/netlink/attr.c index 47bbf45ae5d7..2d106cfe1d27 100644 --- a/net/netlink/attr.c +++ b/net/netlink/attr.c | |||
@@ -132,6 +132,7 @@ errout: | |||
132 | * @maxtype: maximum attribute type to be expected | 132 | * @maxtype: maximum attribute type to be expected |
133 | * @head: head of attribute stream | 133 | * @head: head of attribute stream |
134 | * @len: length of attribute stream | 134 | * @len: length of attribute stream |
135 | * @policy: validation policy | ||
135 | * | 136 | * |
136 | * Parses a stream of attributes and stores a pointer to each attribute in | 137 | * Parses a stream of attributes and stores a pointer to each attribute in |
137 | * the tb array accessable via the attribute type. Attributes with a type | 138 | * the tb array accessable via the attribute type. Attributes with a type |
@@ -194,7 +195,7 @@ struct nlattr *nla_find(struct nlattr *head, int len, int attrtype) | |||
194 | /** | 195 | /** |
195 | * nla_strlcpy - Copy string attribute payload into a sized buffer | 196 | * nla_strlcpy - Copy string attribute payload into a sized buffer |
196 | * @dst: where to copy the string to | 197 | * @dst: where to copy the string to |
197 | * @src: attribute to copy the string from | 198 | * @nla: attribute to copy the string from |
198 | * @dstsize: size of destination buffer | 199 | * @dstsize: size of destination buffer |
199 | * | 200 | * |
200 | * Copies at most dstsize - 1 bytes into the destination buffer. | 201 | * Copies at most dstsize - 1 bytes into the destination buffer. |
@@ -340,9 +341,9 @@ struct nlattr *nla_reserve(struct sk_buff *skb, int attrtype, int attrlen) | |||
340 | } | 341 | } |
341 | 342 | ||
342 | /** | 343 | /** |
343 | * nla_reserve - reserve room for attribute without header | 344 | * nla_reserve_nohdr - reserve room for attribute without header |
344 | * @skb: socket buffer to reserve room on | 345 | * @skb: socket buffer to reserve room on |
345 | * @len: length of attribute payload | 346 | * @attrlen: length of attribute payload |
346 | * | 347 | * |
347 | * Reserves room for attribute payload without a header. | 348 | * Reserves room for attribute payload without a header. |
348 | * | 349 | * |
diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 82adfe6447d7..9437b27ff84d 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig | |||
@@ -106,17 +106,6 @@ config NET_SCH_PRIO | |||
106 | To compile this code as a module, choose M here: the | 106 | To compile this code as a module, choose M here: the |
107 | module will be called sch_prio. | 107 | module will be called sch_prio. |
108 | 108 | ||
109 | config NET_SCH_RR | ||
110 | tristate "Multi Band Round Robin Queuing (RR)" | ||
111 | select NET_SCH_PRIO | ||
112 | ---help--- | ||
113 | Say Y here if you want to use an n-band round robin packet | ||
114 | scheduler. | ||
115 | |||
116 | The module uses sch_prio for its framework and is aliased as | ||
117 | sch_rr, so it will load sch_prio, although it is referred | ||
118 | to using sch_rr. | ||
119 | |||
120 | config NET_SCH_RED | 109 | config NET_SCH_RED |
121 | tristate "Random Early Detection (RED)" | 110 | tristate "Random Early Detection (RED)" |
122 | ---help--- | 111 | ---help--- |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index c40773cdbe45..10f01ad04380 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -1252,12 +1252,12 @@ void tcf_destroy(struct tcf_proto *tp) | |||
1252 | kfree(tp); | 1252 | kfree(tp); |
1253 | } | 1253 | } |
1254 | 1254 | ||
1255 | void tcf_destroy_chain(struct tcf_proto *fl) | 1255 | void tcf_destroy_chain(struct tcf_proto **fl) |
1256 | { | 1256 | { |
1257 | struct tcf_proto *tp; | 1257 | struct tcf_proto *tp; |
1258 | 1258 | ||
1259 | while ((tp = fl) != NULL) { | 1259 | while ((tp = *fl) != NULL) { |
1260 | fl = tp->next; | 1260 | *fl = tp->next; |
1261 | tcf_destroy(tp); | 1261 | tcf_destroy(tp); |
1262 | } | 1262 | } |
1263 | } | 1263 | } |
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 335273416384..db0e23ae85f8 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -160,7 +160,7 @@ static void atm_tc_put(struct Qdisc *sch, unsigned long cl) | |||
160 | *prev = flow->next; | 160 | *prev = flow->next; |
161 | pr_debug("atm_tc_put: qdisc %p\n", flow->q); | 161 | pr_debug("atm_tc_put: qdisc %p\n", flow->q); |
162 | qdisc_destroy(flow->q); | 162 | qdisc_destroy(flow->q); |
163 | tcf_destroy_chain(flow->filter_list); | 163 | tcf_destroy_chain(&flow->filter_list); |
164 | if (flow->sock) { | 164 | if (flow->sock) { |
165 | pr_debug("atm_tc_put: f_count %d\n", | 165 | pr_debug("atm_tc_put: f_count %d\n", |
166 | file_count(flow->sock->file)); | 166 | file_count(flow->sock->file)); |
@@ -586,10 +586,11 @@ static void atm_tc_destroy(struct Qdisc *sch) | |||
586 | struct atm_flow_data *flow; | 586 | struct atm_flow_data *flow; |
587 | 587 | ||
588 | pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p); | 588 | pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p); |
589 | for (flow = p->flows; flow; flow = flow->next) | ||
590 | tcf_destroy_chain(&flow->filter_list); | ||
591 | |||
589 | /* races ? */ | 592 | /* races ? */ |
590 | while ((flow = p->flows)) { | 593 | while ((flow = p->flows)) { |
591 | tcf_destroy_chain(flow->filter_list); | ||
592 | flow->filter_list = NULL; | ||
593 | if (flow->ref > 1) | 594 | if (flow->ref > 1) |
594 | printk(KERN_ERR "atm_destroy: %p->ref = %d\n", flow, | 595 | printk(KERN_ERR "atm_destroy: %p->ref = %d\n", flow, |
595 | flow->ref); | 596 | flow->ref); |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 09969c1fbc08..2a3c97f7dc63 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -1704,7 +1704,7 @@ static void cbq_destroy_class(struct Qdisc *sch, struct cbq_class *cl) | |||
1704 | 1704 | ||
1705 | BUG_TRAP(!cl->filters); | 1705 | BUG_TRAP(!cl->filters); |
1706 | 1706 | ||
1707 | tcf_destroy_chain(cl->filter_list); | 1707 | tcf_destroy_chain(&cl->filter_list); |
1708 | qdisc_destroy(cl->q); | 1708 | qdisc_destroy(cl->q); |
1709 | qdisc_put_rtab(cl->R_tab); | 1709 | qdisc_put_rtab(cl->R_tab); |
1710 | gen_kill_estimator(&cl->bstats, &cl->rate_est); | 1710 | gen_kill_estimator(&cl->bstats, &cl->rate_est); |
@@ -1728,10 +1728,8 @@ cbq_destroy(struct Qdisc* sch) | |||
1728 | * be bound to classes which have been destroyed already. --TGR '04 | 1728 | * be bound to classes which have been destroyed already. --TGR '04 |
1729 | */ | 1729 | */ |
1730 | for (h = 0; h < 16; h++) { | 1730 | for (h = 0; h < 16; h++) { |
1731 | for (cl = q->classes[h]; cl; cl = cl->next) { | 1731 | for (cl = q->classes[h]; cl; cl = cl->next) |
1732 | tcf_destroy_chain(cl->filter_list); | 1732 | tcf_destroy_chain(&cl->filter_list); |
1733 | cl->filter_list = NULL; | ||
1734 | } | ||
1735 | } | 1733 | } |
1736 | for (h = 0; h < 16; h++) { | 1734 | for (h = 0; h < 16; h++) { |
1737 | struct cbq_class *next; | 1735 | struct cbq_class *next; |
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 64465bacbe79..c4c1317cd47d 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -416,7 +416,7 @@ static void dsmark_destroy(struct Qdisc *sch) | |||
416 | 416 | ||
417 | pr_debug("dsmark_destroy(sch %p,[qdisc %p])\n", sch, p); | 417 | pr_debug("dsmark_destroy(sch %p,[qdisc %p])\n", sch, p); |
418 | 418 | ||
419 | tcf_destroy_chain(p->filter_list); | 419 | tcf_destroy_chain(&p->filter_list); |
420 | qdisc_destroy(p->q); | 420 | qdisc_destroy(p->q); |
421 | kfree(p->mask); | 421 | kfree(p->mask); |
422 | } | 422 | } |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index d355e5e47fe3..13afa7214392 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -468,7 +468,7 @@ struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops) | |||
468 | 468 | ||
469 | return sch; | 469 | return sch; |
470 | errout: | 470 | errout: |
471 | return ERR_PTR(-err); | 471 | return ERR_PTR(err); |
472 | } | 472 | } |
473 | 473 | ||
474 | struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops, | 474 | struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops, |
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index fdfaa3fcc16d..e817aa00441d 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -1123,7 +1123,7 @@ hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl) | |||
1123 | { | 1123 | { |
1124 | struct hfsc_sched *q = qdisc_priv(sch); | 1124 | struct hfsc_sched *q = qdisc_priv(sch); |
1125 | 1125 | ||
1126 | tcf_destroy_chain(cl->filter_list); | 1126 | tcf_destroy_chain(&cl->filter_list); |
1127 | qdisc_destroy(cl->qdisc); | 1127 | qdisc_destroy(cl->qdisc); |
1128 | gen_kill_estimator(&cl->bstats, &cl->rate_est); | 1128 | gen_kill_estimator(&cl->bstats, &cl->rate_est); |
1129 | if (cl != &q->root) | 1129 | if (cl != &q->root) |
@@ -1541,6 +1541,10 @@ hfsc_destroy_qdisc(struct Qdisc *sch) | |||
1541 | unsigned int i; | 1541 | unsigned int i; |
1542 | 1542 | ||
1543 | for (i = 0; i < HFSC_HSIZE; i++) { | 1543 | for (i = 0; i < HFSC_HSIZE; i++) { |
1544 | list_for_each_entry(cl, &q->clhash[i], hlist) | ||
1545 | tcf_destroy_chain(&cl->filter_list); | ||
1546 | } | ||
1547 | for (i = 0; i < HFSC_HSIZE; i++) { | ||
1544 | list_for_each_entry_safe(cl, next, &q->clhash[i], hlist) | 1548 | list_for_each_entry_safe(cl, next, &q->clhash[i], hlist) |
1545 | hfsc_destroy_class(sch, cl); | 1549 | hfsc_destroy_class(sch, cl); |
1546 | } | 1550 | } |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 6807c97985a5..3fb58f428f72 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -1238,7 +1238,7 @@ static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl) | |||
1238 | qdisc_put_rtab(cl->rate); | 1238 | qdisc_put_rtab(cl->rate); |
1239 | qdisc_put_rtab(cl->ceil); | 1239 | qdisc_put_rtab(cl->ceil); |
1240 | 1240 | ||
1241 | tcf_destroy_chain(cl->filter_list); | 1241 | tcf_destroy_chain(&cl->filter_list); |
1242 | 1242 | ||
1243 | while (!list_empty(&cl->children)) | 1243 | while (!list_empty(&cl->children)) |
1244 | htb_destroy_class(sch, list_entry(cl->children.next, | 1244 | htb_destroy_class(sch, list_entry(cl->children.next, |
@@ -1267,7 +1267,7 @@ static void htb_destroy(struct Qdisc *sch) | |||
1267 | and surprisingly it worked in 2.4. But it must precede it | 1267 | and surprisingly it worked in 2.4. But it must precede it |
1268 | because filter need its target class alive to be able to call | 1268 | because filter need its target class alive to be able to call |
1269 | unbind_filter on it (without Oops). */ | 1269 | unbind_filter on it (without Oops). */ |
1270 | tcf_destroy_chain(q->filter_list); | 1270 | tcf_destroy_chain(&q->filter_list); |
1271 | 1271 | ||
1272 | while (!list_empty(&q->root)) | 1272 | while (!list_empty(&q->root)) |
1273 | htb_destroy_class(sch, list_entry(q->root.next, | 1273 | htb_destroy_class(sch, list_entry(q->root.next, |
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c index 274b1ddb160c..956c80ad5965 100644 --- a/net/sched/sch_ingress.c +++ b/net/sched/sch_ingress.c | |||
@@ -104,7 +104,7 @@ static void ingress_destroy(struct Qdisc *sch) | |||
104 | { | 104 | { |
105 | struct ingress_qdisc_data *p = qdisc_priv(sch); | 105 | struct ingress_qdisc_data *p = qdisc_priv(sch); |
106 | 106 | ||
107 | tcf_destroy_chain(p->filter_list); | 107 | tcf_destroy_chain(&p->filter_list); |
108 | } | 108 | } |
109 | 109 | ||
110 | static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb) | 110 | static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb) |
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 4aa2b45dad0a..5532f1031ab5 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -219,7 +219,7 @@ prio_destroy(struct Qdisc* sch) | |||
219 | int prio; | 219 | int prio; |
220 | struct prio_sched_data *q = qdisc_priv(sch); | 220 | struct prio_sched_data *q = qdisc_priv(sch); |
221 | 221 | ||
222 | tcf_destroy_chain(q->filter_list); | 222 | tcf_destroy_chain(&q->filter_list); |
223 | for (prio=0; prio<q->bands; prio++) | 223 | for (prio=0; prio<q->bands; prio++) |
224 | qdisc_destroy(q->queues[prio]); | 224 | qdisc_destroy(q->queues[prio]); |
225 | } | 225 | } |
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index f0463d757a98..6a97afbfb952 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -520,7 +520,7 @@ static void sfq_destroy(struct Qdisc *sch) | |||
520 | { | 520 | { |
521 | struct sfq_sched_data *q = qdisc_priv(sch); | 521 | struct sfq_sched_data *q = qdisc_priv(sch); |
522 | 522 | ||
523 | tcf_destroy_chain(q->filter_list); | 523 | tcf_destroy_chain(&q->filter_list); |
524 | q->perturb_period = 0; | 524 | q->perturb_period = 0; |
525 | del_timer_sync(&q->perturb_timer); | 525 | del_timer_sync(&q->perturb_timer); |
526 | } | 526 | } |
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 5905d56737d6..81ae3d62a0cc 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -1144,20 +1144,20 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) | |||
1144 | case RPC_GSS_SVC_NONE: | 1144 | case RPC_GSS_SVC_NONE: |
1145 | break; | 1145 | break; |
1146 | case RPC_GSS_SVC_INTEGRITY: | 1146 | case RPC_GSS_SVC_INTEGRITY: |
1147 | /* placeholders for length and seq. number: */ | ||
1148 | svc_putnl(resv, 0); | ||
1149 | svc_putnl(resv, 0); | ||
1147 | if (unwrap_integ_data(&rqstp->rq_arg, | 1150 | if (unwrap_integ_data(&rqstp->rq_arg, |
1148 | gc->gc_seq, rsci->mechctx)) | 1151 | gc->gc_seq, rsci->mechctx)) |
1149 | goto garbage_args; | 1152 | goto garbage_args; |
1153 | break; | ||
1154 | case RPC_GSS_SVC_PRIVACY: | ||
1150 | /* placeholders for length and seq. number: */ | 1155 | /* placeholders for length and seq. number: */ |
1151 | svc_putnl(resv, 0); | 1156 | svc_putnl(resv, 0); |
1152 | svc_putnl(resv, 0); | 1157 | svc_putnl(resv, 0); |
1153 | break; | ||
1154 | case RPC_GSS_SVC_PRIVACY: | ||
1155 | if (unwrap_priv_data(rqstp, &rqstp->rq_arg, | 1158 | if (unwrap_priv_data(rqstp, &rqstp->rq_arg, |
1156 | gc->gc_seq, rsci->mechctx)) | 1159 | gc->gc_seq, rsci->mechctx)) |
1157 | goto garbage_args; | 1160 | goto garbage_args; |
1158 | /* placeholders for length and seq. number: */ | ||
1159 | svc_putnl(resv, 0); | ||
1160 | svc_putnl(resv, 0); | ||
1161 | break; | 1161 | break; |
1162 | default: | 1162 | default: |
1163 | goto auth_err; | 1163 | goto auth_err; |
@@ -1170,8 +1170,6 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) | |||
1170 | goto out; | 1170 | goto out; |
1171 | } | 1171 | } |
1172 | garbage_args: | 1172 | garbage_args: |
1173 | /* Restore write pointer to its original value: */ | ||
1174 | xdr_ressize_check(rqstp, reject_stat); | ||
1175 | ret = SVC_GARBAGE; | 1173 | ret = SVC_GARBAGE; |
1176 | goto out; | 1174 | goto out; |
1177 | auth_err: | 1175 | auth_err: |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 657835f227d3..783317dacd30 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -487,8 +487,8 @@ static int unix_socketpair(struct socket *, struct socket *); | |||
487 | static int unix_accept(struct socket *, struct socket *, int); | 487 | static int unix_accept(struct socket *, struct socket *, int); |
488 | static int unix_getname(struct socket *, struct sockaddr *, int *, int); | 488 | static int unix_getname(struct socket *, struct sockaddr *, int *, int); |
489 | static unsigned int unix_poll(struct file *, struct socket *, poll_table *); | 489 | static unsigned int unix_poll(struct file *, struct socket *, poll_table *); |
490 | static unsigned int unix_datagram_poll(struct file *, struct socket *, | 490 | static unsigned int unix_dgram_poll(struct file *, struct socket *, |
491 | poll_table *); | 491 | poll_table *); |
492 | static int unix_ioctl(struct socket *, unsigned int, unsigned long); | 492 | static int unix_ioctl(struct socket *, unsigned int, unsigned long); |
493 | static int unix_shutdown(struct socket *, int); | 493 | static int unix_shutdown(struct socket *, int); |
494 | static int unix_stream_sendmsg(struct kiocb *, struct socket *, | 494 | static int unix_stream_sendmsg(struct kiocb *, struct socket *, |
@@ -534,7 +534,7 @@ static const struct proto_ops unix_dgram_ops = { | |||
534 | .socketpair = unix_socketpair, | 534 | .socketpair = unix_socketpair, |
535 | .accept = sock_no_accept, | 535 | .accept = sock_no_accept, |
536 | .getname = unix_getname, | 536 | .getname = unix_getname, |
537 | .poll = unix_datagram_poll, | 537 | .poll = unix_dgram_poll, |
538 | .ioctl = unix_ioctl, | 538 | .ioctl = unix_ioctl, |
539 | .listen = sock_no_listen, | 539 | .listen = sock_no_listen, |
540 | .shutdown = unix_shutdown, | 540 | .shutdown = unix_shutdown, |
@@ -555,7 +555,7 @@ static const struct proto_ops unix_seqpacket_ops = { | |||
555 | .socketpair = unix_socketpair, | 555 | .socketpair = unix_socketpair, |
556 | .accept = unix_accept, | 556 | .accept = unix_accept, |
557 | .getname = unix_getname, | 557 | .getname = unix_getname, |
558 | .poll = unix_datagram_poll, | 558 | .poll = unix_dgram_poll, |
559 | .ioctl = unix_ioctl, | 559 | .ioctl = unix_ioctl, |
560 | .listen = unix_listen, | 560 | .listen = unix_listen, |
561 | .shutdown = unix_shutdown, | 561 | .shutdown = unix_shutdown, |
@@ -1994,29 +1994,13 @@ static unsigned int unix_poll(struct file * file, struct socket *sock, poll_tabl | |||
1994 | return mask; | 1994 | return mask; |
1995 | } | 1995 | } |
1996 | 1996 | ||
1997 | static unsigned int unix_datagram_poll(struct file *file, struct socket *sock, | 1997 | static unsigned int unix_dgram_poll(struct file *file, struct socket *sock, |
1998 | poll_table *wait) | 1998 | poll_table *wait) |
1999 | { | 1999 | { |
2000 | struct sock *sk = sock->sk, *peer; | 2000 | struct sock *sk = sock->sk, *other; |
2001 | unsigned int mask; | 2001 | unsigned int mask, writable; |
2002 | 2002 | ||
2003 | poll_wait(file, sk->sk_sleep, wait); | 2003 | poll_wait(file, sk->sk_sleep, wait); |
2004 | |||
2005 | peer = unix_peer_get(sk); | ||
2006 | if (peer) { | ||
2007 | if (peer != sk) { | ||
2008 | /* | ||
2009 | * Writability of a connected socket additionally | ||
2010 | * depends on the state of the receive queue of the | ||
2011 | * peer. | ||
2012 | */ | ||
2013 | poll_wait(file, &unix_sk(peer)->peer_wait, wait); | ||
2014 | } else { | ||
2015 | sock_put(peer); | ||
2016 | peer = NULL; | ||
2017 | } | ||
2018 | } | ||
2019 | |||
2020 | mask = 0; | 2004 | mask = 0; |
2021 | 2005 | ||
2022 | /* exceptional events? */ | 2006 | /* exceptional events? */ |
@@ -2042,14 +2026,26 @@ static unsigned int unix_datagram_poll(struct file *file, struct socket *sock, | |||
2042 | } | 2026 | } |
2043 | 2027 | ||
2044 | /* writable? */ | 2028 | /* writable? */ |
2045 | if (unix_writable(sk) && !(peer && unix_recvq_full(peer))) | 2029 | writable = unix_writable(sk); |
2030 | if (writable) { | ||
2031 | other = unix_peer_get(sk); | ||
2032 | if (other) { | ||
2033 | if (unix_peer(other) != sk) { | ||
2034 | poll_wait(file, &unix_sk(other)->peer_wait, | ||
2035 | wait); | ||
2036 | if (unix_recvq_full(other)) | ||
2037 | writable = 0; | ||
2038 | } | ||
2039 | |||
2040 | sock_put(other); | ||
2041 | } | ||
2042 | } | ||
2043 | |||
2044 | if (writable) | ||
2046 | mask |= POLLOUT | POLLWRNORM | POLLWRBAND; | 2045 | mask |= POLLOUT | POLLWRNORM | POLLWRBAND; |
2047 | else | 2046 | else |
2048 | set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); | 2047 | set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); |
2049 | 2048 | ||
2050 | if (peer) | ||
2051 | sock_put(peer); | ||
2052 | |||
2053 | return mask; | 2049 | return mask; |
2054 | } | 2050 | } |
2055 | 2051 | ||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 185488da2466..855bff4b3250 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -80,6 +80,23 @@ static const struct ieee80211_channel_range ieee80211_JP_channels[] = { | |||
80 | IEEE80211_CHAN_RADAR), | 80 | IEEE80211_CHAN_RADAR), |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static const struct ieee80211_channel_range ieee80211_EU_channels[] = { | ||
84 | /* IEEE 802.11b/g, channels 1..13 */ | ||
85 | RANGE_PWR(2412, 2472, 20, 6, 0), | ||
86 | /* IEEE 802.11a, channel 36*/ | ||
87 | RANGE_PWR(5180, 5180, 23, 6, IEEE80211_CHAN_PASSIVE_SCAN), | ||
88 | /* IEEE 802.11a, channel 40*/ | ||
89 | RANGE_PWR(5200, 5200, 23, 6, IEEE80211_CHAN_PASSIVE_SCAN), | ||
90 | /* IEEE 802.11a, channel 44*/ | ||
91 | RANGE_PWR(5220, 5220, 23, 6, IEEE80211_CHAN_PASSIVE_SCAN), | ||
92 | /* IEEE 802.11a, channels 48..64 */ | ||
93 | RANGE_PWR(5240, 5320, 23, 6, IEEE80211_CHAN_NO_IBSS | | ||
94 | IEEE80211_CHAN_RADAR), | ||
95 | /* IEEE 802.11a, channels 100..140 */ | ||
96 | RANGE_PWR(5500, 5700, 30, 6, IEEE80211_CHAN_NO_IBSS | | ||
97 | IEEE80211_CHAN_RADAR), | ||
98 | }; | ||
99 | |||
83 | #define REGDOM(_code) \ | 100 | #define REGDOM(_code) \ |
84 | { \ | 101 | { \ |
85 | .code = __stringify(_code), \ | 102 | .code = __stringify(_code), \ |
@@ -90,6 +107,7 @@ static const struct ieee80211_channel_range ieee80211_JP_channels[] = { | |||
90 | static const struct ieee80211_regdomain ieee80211_regdoms[] = { | 107 | static const struct ieee80211_regdomain ieee80211_regdoms[] = { |
91 | REGDOM(US), | 108 | REGDOM(US), |
92 | REGDOM(JP), | 109 | REGDOM(JP), |
110 | REGDOM(EU), | ||
93 | }; | 111 | }; |
94 | 112 | ||
95 | 113 | ||