diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-10 20:58:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-10 20:58:47 -0400 |
commit | e5a5816f7875207cb0a0a7032e39a4686c5e10a4 (patch) | |
tree | 6c80171401f4cd38685e19d2f36ac54560720d5f /net | |
parent | bdb21928512a860a60e6a24a849dc5b63cbaf96a (diff) | |
parent | e35259a95331ae4a9146cc03ab49aad641cab957 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
tun: Persistent devices can get stuck in xoff state
xfrm: Add a XFRM_STATE_AF_UNSPEC flag to xfrm_usersa_info
ipv6: missed namespace context in ipv6_rthdr_rcv
netlabel: netlink_unicast calls kfree_skb on error path by itself
ipv4: fib_trie: Fix lookup error return
tcp: correct kcalloc usage
ip: sysctl documentation cleanup
Documentation: clarify tcp_{r,w}mem sysctl docs
netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
netfilter: nf_conntrack_tcp: fix endless loop
libertas: fix memory alignment problems on the blackfin
zd1211rw: stop beacons on remove_interface
rt2x00: Disable synchronization during initialization
rc80211_pid: Fix fast_start parameter handling
sctp: Add documentation for sctp sysctl variable
ipv6: fix race between ipv6_del_addr and DAD timer
irda: Fix netlink error path return value
irda: New device ID for nsc-ircc
irda: via-ircc proper dma freeing
sctp: Mark the tsn as received after all allocations finish
...
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/fib_trie.c | 17 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_snmp_basic.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_probe.c | 2 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 4 | ||||
-rw-r--r-- | net/ipv6/exthdrs.c | 2 | ||||
-rw-r--r-- | net/irda/irnetlink.c | 4 | ||||
-rw-r--r-- | net/mac80211/main.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 13 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid.h | 5 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 31 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_tcp.c | 10 | ||||
-rw-r--r-- | net/netlabel/netlabel_cipso_v4.c | 7 | ||||
-rw-r--r-- | net/netlabel/netlabel_mgmt.c | 12 | ||||
-rw-r--r-- | net/netlabel/netlabel_unlabeled.c | 6 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 9 | ||||
-rw-r--r-- | net/sctp/ulpevent.c | 5 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 3 |
17 files changed, 58 insertions, 78 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 4b02d14e7ab..e1600ad8fb0 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -1359,17 +1359,17 @@ static int check_leaf(struct trie *t, struct leaf *l, | |||
1359 | t->stats.semantic_match_miss++; | 1359 | t->stats.semantic_match_miss++; |
1360 | #endif | 1360 | #endif |
1361 | if (err <= 0) | 1361 | if (err <= 0) |
1362 | return plen; | 1362 | return err; |
1363 | } | 1363 | } |
1364 | 1364 | ||
1365 | return -1; | 1365 | return 1; |
1366 | } | 1366 | } |
1367 | 1367 | ||
1368 | static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | 1368 | static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, |
1369 | struct fib_result *res) | 1369 | struct fib_result *res) |
1370 | { | 1370 | { |
1371 | struct trie *t = (struct trie *) tb->tb_data; | 1371 | struct trie *t = (struct trie *) tb->tb_data; |
1372 | int plen, ret = 0; | 1372 | int ret; |
1373 | struct node *n; | 1373 | struct node *n; |
1374 | struct tnode *pn; | 1374 | struct tnode *pn; |
1375 | int pos, bits; | 1375 | int pos, bits; |
@@ -1393,10 +1393,7 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | |||
1393 | 1393 | ||
1394 | /* Just a leaf? */ | 1394 | /* Just a leaf? */ |
1395 | if (IS_LEAF(n)) { | 1395 | if (IS_LEAF(n)) { |
1396 | plen = check_leaf(t, (struct leaf *)n, key, flp, res); | 1396 | ret = check_leaf(t, (struct leaf *)n, key, flp, res); |
1397 | if (plen < 0) | ||
1398 | goto failed; | ||
1399 | ret = 0; | ||
1400 | goto found; | 1397 | goto found; |
1401 | } | 1398 | } |
1402 | 1399 | ||
@@ -1421,11 +1418,9 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | |||
1421 | } | 1418 | } |
1422 | 1419 | ||
1423 | if (IS_LEAF(n)) { | 1420 | if (IS_LEAF(n)) { |
1424 | plen = check_leaf(t, (struct leaf *)n, key, flp, res); | 1421 | ret = check_leaf(t, (struct leaf *)n, key, flp, res); |
1425 | if (plen < 0) | 1422 | if (ret > 0) |
1426 | goto backtrace; | 1423 | goto backtrace; |
1427 | |||
1428 | ret = 0; | ||
1429 | goto found; | 1424 | goto found; |
1430 | } | 1425 | } |
1431 | 1426 | ||
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index 7750c97fde7..ffeaffc3fff 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c | |||
@@ -439,8 +439,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx, | |||
439 | unsigned int *len) | 439 | unsigned int *len) |
440 | { | 440 | { |
441 | unsigned long subid; | 441 | unsigned long subid; |
442 | unsigned int size; | ||
443 | unsigned long *optr; | 442 | unsigned long *optr; |
443 | size_t size; | ||
444 | 444 | ||
445 | size = eoc - ctx->pointer + 1; | 445 | size = eoc - ctx->pointer + 1; |
446 | 446 | ||
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 5ff0ce6e9d3..7ddc30f0744 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -224,7 +224,7 @@ static __init int tcpprobe_init(void) | |||
224 | if (bufsize < 0) | 224 | if (bufsize < 0) |
225 | return -EINVAL; | 225 | return -EINVAL; |
226 | 226 | ||
227 | tcp_probe.log = kcalloc(sizeof(struct tcp_log), bufsize, GFP_KERNEL); | 227 | tcp_probe.log = kcalloc(bufsize, sizeof(struct tcp_log), GFP_KERNEL); |
228 | if (!tcp_probe.log) | 228 | if (!tcp_probe.log) |
229 | goto err0; | 229 | goto err0; |
230 | 230 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 147588f4c7c..ff61a5cdb0b 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -749,12 +749,12 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
749 | } | 749 | } |
750 | write_unlock_bh(&idev->lock); | 750 | write_unlock_bh(&idev->lock); |
751 | 751 | ||
752 | addrconf_del_timer(ifp); | ||
753 | |||
752 | ipv6_ifa_notify(RTM_DELADDR, ifp); | 754 | ipv6_ifa_notify(RTM_DELADDR, ifp); |
753 | 755 | ||
754 | atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifp); | 756 | atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifp); |
755 | 757 | ||
756 | addrconf_del_timer(ifp); | ||
757 | |||
758 | /* | 758 | /* |
759 | * Purge or update corresponding prefix | 759 | * Purge or update corresponding prefix |
760 | * | 760 | * |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 3cd1c993d52..dcf94fdfb86 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -445,7 +445,7 @@ looped_back: | |||
445 | kfree_skb(skb); | 445 | kfree_skb(skb); |
446 | return -1; | 446 | return -1; |
447 | } | 447 | } |
448 | if (!ipv6_chk_home_addr(&init_net, addr)) { | 448 | if (!ipv6_chk_home_addr(dev_net(skb->dst->dev), addr)) { |
449 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), | 449 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), |
450 | IPSTATS_MIB_INADDRERRORS); | 450 | IPSTATS_MIB_INADDRERRORS); |
451 | kfree_skb(skb); | 451 | kfree_skb(skb); |
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c index 9e1fb82e322..2f05ec1037a 100644 --- a/net/irda/irnetlink.c +++ b/net/irda/irnetlink.c | |||
@@ -101,8 +101,8 @@ static int irda_nl_get_mode(struct sk_buff *skb, struct genl_info *info) | |||
101 | 101 | ||
102 | hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, | 102 | hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, |
103 | &irda_nl_family, 0, IRDA_NL_CMD_GET_MODE); | 103 | &irda_nl_family, 0, IRDA_NL_CMD_GET_MODE); |
104 | if (IS_ERR(hdr)) { | 104 | if (hdr == NULL) { |
105 | ret = PTR_ERR(hdr); | 105 | ret = -EMSGSIZE; |
106 | goto err_out; | 106 | goto err_out; |
107 | } | 107 | } |
108 | 108 | ||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 98c0b5e56ec..df0836ff1a2 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -530,8 +530,6 @@ static int ieee80211_stop(struct net_device *dev) | |||
530 | local->sta_hw_scanning = 0; | 530 | local->sta_hw_scanning = 0; |
531 | } | 531 | } |
532 | 532 | ||
533 | flush_workqueue(local->hw.workqueue); | ||
534 | |||
535 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; | 533 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; |
536 | kfree(sdata->u.sta.extra_ie); | 534 | kfree(sdata->u.sta.extra_ie); |
537 | sdata->u.sta.extra_ie = NULL; | 535 | sdata->u.sta.extra_ie = NULL; |
@@ -555,6 +553,8 @@ static int ieee80211_stop(struct net_device *dev) | |||
555 | 553 | ||
556 | ieee80211_led_radio(local, 0); | 554 | ieee80211_led_radio(local, 0); |
557 | 555 | ||
556 | flush_workqueue(local->hw.workqueue); | ||
557 | |||
558 | tasklet_disable(&local->tx_pending_tasklet); | 558 | tasklet_disable(&local->tx_pending_tasklet); |
559 | tasklet_disable(&local->tasklet); | 559 | tasklet_disable(&local->tasklet); |
560 | } | 560 | } |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4d2b582dd05..b404537c0bc 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -547,15 +547,14 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
547 | sdata->bss_conf.ht_bss_conf = &conf->ht_bss_conf; | 547 | sdata->bss_conf.ht_bss_conf = &conf->ht_bss_conf; |
548 | } | 548 | } |
549 | 549 | ||
550 | netif_carrier_on(dev); | ||
551 | ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET; | 550 | ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET; |
552 | memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN); | 551 | memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN); |
553 | memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN); | 552 | memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN); |
554 | ieee80211_sta_send_associnfo(dev, ifsta); | 553 | ieee80211_sta_send_associnfo(dev, ifsta); |
555 | } else { | 554 | } else { |
555 | netif_carrier_off(dev); | ||
556 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); | 556 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); |
557 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; | 557 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; |
558 | netif_carrier_off(dev); | ||
559 | ieee80211_reset_erp_info(dev); | 558 | ieee80211_reset_erp_info(dev); |
560 | 559 | ||
561 | sdata->bss_conf.assoc_ht = 0; | 560 | sdata->bss_conf.assoc_ht = 0; |
@@ -569,6 +568,10 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
569 | 568 | ||
570 | sdata->bss_conf.assoc = assoc; | 569 | sdata->bss_conf.assoc = assoc; |
571 | ieee80211_bss_info_change_notify(sdata, changed); | 570 | ieee80211_bss_info_change_notify(sdata, changed); |
571 | |||
572 | if (assoc) | ||
573 | netif_carrier_on(dev); | ||
574 | |||
572 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 575 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
573 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); | 576 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); |
574 | } | 577 | } |
@@ -3611,8 +3614,10 @@ static int ieee80211_sta_find_ibss(struct net_device *dev, | |||
3611 | spin_unlock_bh(&local->sta_bss_lock); | 3614 | spin_unlock_bh(&local->sta_bss_lock); |
3612 | 3615 | ||
3613 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 3616 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
3614 | printk(KERN_DEBUG " sta_find_ibss: selected %s current " | 3617 | if (found) |
3615 | "%s\n", print_mac(mac, bssid), print_mac(mac2, ifsta->bssid)); | 3618 | printk(KERN_DEBUG " sta_find_ibss: selected %s current " |
3619 | "%s\n", print_mac(mac, bssid), | ||
3620 | print_mac(mac2, ifsta->bssid)); | ||
3616 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 3621 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
3617 | if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 && | 3622 | if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 && |
3618 | (bss = ieee80211_rx_bss_get(dev, bssid, | 3623 | (bss = ieee80211_rx_bss_get(dev, bssid, |
diff --git a/net/mac80211/rc80211_pid.h b/net/mac80211/rc80211_pid.h index 04afc13ed82..4ea7b97d1af 100644 --- a/net/mac80211/rc80211_pid.h +++ b/net/mac80211/rc80211_pid.h | |||
@@ -141,7 +141,6 @@ struct rc_pid_events_file_info { | |||
141 | * rate behaviour values (lower means we should trust more what we learnt | 141 | * rate behaviour values (lower means we should trust more what we learnt |
142 | * about behaviour of rates, higher means we should trust more the natural | 142 | * about behaviour of rates, higher means we should trust more the natural |
143 | * ordering of rates) | 143 | * ordering of rates) |
144 | * @fast_start: if Y, push high rates right after initialization | ||
145 | */ | 144 | */ |
146 | struct rc_pid_debugfs_entries { | 145 | struct rc_pid_debugfs_entries { |
147 | struct dentry *dir; | 146 | struct dentry *dir; |
@@ -154,7 +153,6 @@ struct rc_pid_debugfs_entries { | |||
154 | struct dentry *sharpen_factor; | 153 | struct dentry *sharpen_factor; |
155 | struct dentry *sharpen_duration; | 154 | struct dentry *sharpen_duration; |
156 | struct dentry *norm_offset; | 155 | struct dentry *norm_offset; |
157 | struct dentry *fast_start; | ||
158 | }; | 156 | }; |
159 | 157 | ||
160 | void rate_control_pid_event_tx_status(struct rc_pid_event_buffer *buf, | 158 | void rate_control_pid_event_tx_status(struct rc_pid_event_buffer *buf, |
@@ -267,9 +265,6 @@ struct rc_pid_info { | |||
267 | /* Normalization offset. */ | 265 | /* Normalization offset. */ |
268 | unsigned int norm_offset; | 266 | unsigned int norm_offset; |
269 | 267 | ||
270 | /* Fast starst parameter. */ | ||
271 | unsigned int fast_start; | ||
272 | |||
273 | /* Rates information. */ | 268 | /* Rates information. */ |
274 | struct rc_pid_rateinfo *rinfo; | 269 | struct rc_pid_rateinfo *rinfo; |
275 | 270 | ||
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index a849b745bdb..bcd27c1d759 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -398,13 +398,25 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) | |||
398 | return NULL; | 398 | return NULL; |
399 | } | 399 | } |
400 | 400 | ||
401 | pinfo->target = RC_PID_TARGET_PF; | ||
402 | pinfo->sampling_period = RC_PID_INTERVAL; | ||
403 | pinfo->coeff_p = RC_PID_COEFF_P; | ||
404 | pinfo->coeff_i = RC_PID_COEFF_I; | ||
405 | pinfo->coeff_d = RC_PID_COEFF_D; | ||
406 | pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT; | ||
407 | pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR; | ||
408 | pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION; | ||
409 | pinfo->norm_offset = RC_PID_NORM_OFFSET; | ||
410 | pinfo->rinfo = rinfo; | ||
411 | pinfo->oldrate = 0; | ||
412 | |||
401 | /* Sort the rates. This is optimized for the most common case (i.e. | 413 | /* Sort the rates. This is optimized for the most common case (i.e. |
402 | * almost-sorted CCK+OFDM rates). Kind of bubble-sort with reversed | 414 | * almost-sorted CCK+OFDM rates). Kind of bubble-sort with reversed |
403 | * mapping too. */ | 415 | * mapping too. */ |
404 | for (i = 0; i < sband->n_bitrates; i++) { | 416 | for (i = 0; i < sband->n_bitrates; i++) { |
405 | rinfo[i].index = i; | 417 | rinfo[i].index = i; |
406 | rinfo[i].rev_index = i; | 418 | rinfo[i].rev_index = i; |
407 | if (pinfo->fast_start) | 419 | if (RC_PID_FAST_START) |
408 | rinfo[i].diff = 0; | 420 | rinfo[i].diff = 0; |
409 | else | 421 | else |
410 | rinfo[i].diff = i * pinfo->norm_offset; | 422 | rinfo[i].diff = i * pinfo->norm_offset; |
@@ -425,19 +437,6 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) | |||
425 | break; | 437 | break; |
426 | } | 438 | } |
427 | 439 | ||
428 | pinfo->target = RC_PID_TARGET_PF; | ||
429 | pinfo->sampling_period = RC_PID_INTERVAL; | ||
430 | pinfo->coeff_p = RC_PID_COEFF_P; | ||
431 | pinfo->coeff_i = RC_PID_COEFF_I; | ||
432 | pinfo->coeff_d = RC_PID_COEFF_D; | ||
433 | pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT; | ||
434 | pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR; | ||
435 | pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION; | ||
436 | pinfo->norm_offset = RC_PID_NORM_OFFSET; | ||
437 | pinfo->fast_start = RC_PID_FAST_START; | ||
438 | pinfo->rinfo = rinfo; | ||
439 | pinfo->oldrate = 0; | ||
440 | |||
441 | #ifdef CONFIG_MAC80211_DEBUGFS | 440 | #ifdef CONFIG_MAC80211_DEBUGFS |
442 | de = &pinfo->dentries; | 441 | de = &pinfo->dentries; |
443 | de->dir = debugfs_create_dir("rc80211_pid", | 442 | de->dir = debugfs_create_dir("rc80211_pid", |
@@ -465,9 +464,6 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) | |||
465 | de->norm_offset = debugfs_create_u32("norm_offset", | 464 | de->norm_offset = debugfs_create_u32("norm_offset", |
466 | S_IRUSR | S_IWUSR, de->dir, | 465 | S_IRUSR | S_IWUSR, de->dir, |
467 | &pinfo->norm_offset); | 466 | &pinfo->norm_offset); |
468 | de->fast_start = debugfs_create_bool("fast_start", | ||
469 | S_IRUSR | S_IWUSR, de->dir, | ||
470 | &pinfo->fast_start); | ||
471 | #endif | 467 | #endif |
472 | 468 | ||
473 | return pinfo; | 469 | return pinfo; |
@@ -479,7 +475,6 @@ static void rate_control_pid_free(void *priv) | |||
479 | #ifdef CONFIG_MAC80211_DEBUGFS | 475 | #ifdef CONFIG_MAC80211_DEBUGFS |
480 | struct rc_pid_debugfs_entries *de = &pinfo->dentries; | 476 | struct rc_pid_debugfs_entries *de = &pinfo->dentries; |
481 | 477 | ||
482 | debugfs_remove(de->fast_start); | ||
483 | debugfs_remove(de->norm_offset); | 478 | debugfs_remove(de->norm_offset); |
484 | debugfs_remove(de->sharpen_duration); | 479 | debugfs_remove(de->sharpen_duration); |
485 | debugfs_remove(de->sharpen_factor); | 480 | debugfs_remove(de->sharpen_factor); |
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index 271cd01d57a..dd28fb239a6 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -844,9 +844,15 @@ static int tcp_packet(struct nf_conn *ct, | |||
844 | /* Attempt to reopen a closed/aborted connection. | 844 | /* Attempt to reopen a closed/aborted connection. |
845 | * Delete this connection and look up again. */ | 845 | * Delete this connection and look up again. */ |
846 | write_unlock_bh(&tcp_lock); | 846 | write_unlock_bh(&tcp_lock); |
847 | if (del_timer(&ct->timeout)) | 847 | /* Only repeat if we can actually remove the timer. |
848 | * Destruction may already be in progress in process | ||
849 | * context and we must give it a chance to terminate. | ||
850 | */ | ||
851 | if (del_timer(&ct->timeout)) { | ||
848 | ct->timeout.function((unsigned long)ct); | 852 | ct->timeout.function((unsigned long)ct); |
849 | return -NF_REPEAT; | 853 | return -NF_REPEAT; |
854 | } | ||
855 | return -NF_DROP; | ||
850 | } | 856 | } |
851 | /* Fall through */ | 857 | /* Fall through */ |
852 | case TCP_CONNTRACK_IGNORE: | 858 | case TCP_CONNTRACK_IGNORE: |
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index fdc14a0d21a..9080c61b71a 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c | |||
@@ -584,12 +584,7 @@ list_start: | |||
584 | rcu_read_unlock(); | 584 | rcu_read_unlock(); |
585 | 585 | ||
586 | genlmsg_end(ans_skb, data); | 586 | genlmsg_end(ans_skb, data); |
587 | 587 | return genlmsg_reply(ans_skb, info); | |
588 | ret_val = genlmsg_reply(ans_skb, info); | ||
589 | if (ret_val != 0) | ||
590 | goto list_failure; | ||
591 | |||
592 | return 0; | ||
593 | 588 | ||
594 | list_retry: | 589 | list_retry: |
595 | /* XXX - this limit is a guesstimate */ | 590 | /* XXX - this limit is a guesstimate */ |
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index 22c19126780..44be5d5261f 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
@@ -386,11 +386,7 @@ static int netlbl_mgmt_listdef(struct sk_buff *skb, struct genl_info *info) | |||
386 | rcu_read_unlock(); | 386 | rcu_read_unlock(); |
387 | 387 | ||
388 | genlmsg_end(ans_skb, data); | 388 | genlmsg_end(ans_skb, data); |
389 | 389 | return genlmsg_reply(ans_skb, info); | |
390 | ret_val = genlmsg_reply(ans_skb, info); | ||
391 | if (ret_val != 0) | ||
392 | goto listdef_failure; | ||
393 | return 0; | ||
394 | 390 | ||
395 | listdef_failure_lock: | 391 | listdef_failure_lock: |
396 | rcu_read_unlock(); | 392 | rcu_read_unlock(); |
@@ -501,11 +497,7 @@ static int netlbl_mgmt_version(struct sk_buff *skb, struct genl_info *info) | |||
501 | goto version_failure; | 497 | goto version_failure; |
502 | 498 | ||
503 | genlmsg_end(ans_skb, data); | 499 | genlmsg_end(ans_skb, data); |
504 | 500 | return genlmsg_reply(ans_skb, info); | |
505 | ret_val = genlmsg_reply(ans_skb, info); | ||
506 | if (ret_val != 0) | ||
507 | goto version_failure; | ||
508 | return 0; | ||
509 | 501 | ||
510 | version_failure: | 502 | version_failure: |
511 | kfree_skb(ans_skb); | 503 | kfree_skb(ans_skb); |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 52b2611a6eb..56f80872924 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -1107,11 +1107,7 @@ static int netlbl_unlabel_list(struct sk_buff *skb, struct genl_info *info) | |||
1107 | goto list_failure; | 1107 | goto list_failure; |
1108 | 1108 | ||
1109 | genlmsg_end(ans_skb, data); | 1109 | genlmsg_end(ans_skb, data); |
1110 | 1110 | return genlmsg_reply(ans_skb, info); | |
1111 | ret_val = genlmsg_reply(ans_skb, info); | ||
1112 | if (ret_val != 0) | ||
1113 | goto list_failure; | ||
1114 | return 0; | ||
1115 | 1111 | ||
1116 | list_failure: | 1112 | list_failure: |
1117 | kfree_skb(ans_skb); | 1113 | kfree_skb(ans_skb); |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 0c9d5a6950f..fcdb45d1071 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -5899,12 +5899,6 @@ static int sctp_eat_data(const struct sctp_association *asoc, | |||
5899 | return SCTP_IERROR_NO_DATA; | 5899 | return SCTP_IERROR_NO_DATA; |
5900 | } | 5900 | } |
5901 | 5901 | ||
5902 | /* If definately accepting the DATA chunk, record its TSN, otherwise | ||
5903 | * wait for renege processing. | ||
5904 | */ | ||
5905 | if (SCTP_CMD_CHUNK_ULP == deliver) | ||
5906 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn)); | ||
5907 | |||
5908 | chunk->data_accepted = 1; | 5902 | chunk->data_accepted = 1; |
5909 | 5903 | ||
5910 | /* Note: Some chunks may get overcounted (if we drop) or overcounted | 5904 | /* Note: Some chunks may get overcounted (if we drop) or overcounted |
@@ -5924,6 +5918,9 @@ static int sctp_eat_data(const struct sctp_association *asoc, | |||
5924 | * and discard the DATA chunk. | 5918 | * and discard the DATA chunk. |
5925 | */ | 5919 | */ |
5926 | if (ntohs(data_hdr->stream) >= asoc->c.sinit_max_instreams) { | 5920 | if (ntohs(data_hdr->stream) >= asoc->c.sinit_max_instreams) { |
5921 | /* Mark tsn as received even though we drop it */ | ||
5922 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn)); | ||
5923 | |||
5927 | err = sctp_make_op_error(asoc, chunk, SCTP_ERROR_INV_STRM, | 5924 | err = sctp_make_op_error(asoc, chunk, SCTP_ERROR_INV_STRM, |
5928 | &data_hdr->stream, | 5925 | &data_hdr->stream, |
5929 | sizeof(data_hdr->stream)); | 5926 | sizeof(data_hdr->stream)); |
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c index ce6cda6b699..a1f654aea26 100644 --- a/net/sctp/ulpevent.c +++ b/net/sctp/ulpevent.c | |||
@@ -710,6 +710,11 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, | |||
710 | if (!skb) | 710 | if (!skb) |
711 | goto fail; | 711 | goto fail; |
712 | 712 | ||
713 | /* Now that all memory allocations for this chunk succeeded, we | ||
714 | * can mark it as received so the tsn_map is updated correctly. | ||
715 | */ | ||
716 | sctp_tsnmap_mark(&asoc->peer.tsn_map, ntohl(chunk->subh.data_hdr->tsn)); | ||
717 | |||
713 | /* First calculate the padding, so we don't inadvertently | 718 | /* First calculate the padding, so we don't inadvertently |
714 | * pass up the wrong length to the user. | 719 | * pass up the wrong length to the user. |
715 | * | 720 | * |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index b976d9ed10e..04c41504f84 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -277,9 +277,8 @@ static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info * | |||
277 | memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); | 277 | memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); |
278 | x->props.flags = p->flags; | 278 | x->props.flags = p->flags; |
279 | 279 | ||
280 | if (!x->sel.family) | 280 | if (!x->sel.family && !(p->flags & XFRM_STATE_AF_UNSPEC)) |
281 | x->sel.family = p->family; | 281 | x->sel.family = p->family; |
282 | |||
283 | } | 282 | } |
284 | 283 | ||
285 | /* | 284 | /* |