diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-30 17:01:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-30 17:01:36 -0500 |
commit | cd79bf7b1c061752dbee723bccf60c85d6c2d45d (patch) | |
tree | bc892e172aa64aa80b087767dfce767559ae4795 /net | |
parent | d0964c37b539c2b76752b1ff8b0a618c5f82f077 (diff) | |
parent | 0cae200eec6330cd2c20b24279597be1da50dc93 (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: (42 commits)
b44: Fix wedge when using netconsole.
wan: cosa: drop chan->wsem on error path
ep93xx-eth: check for zero MAC address on probe, not on device open
NET: smc91x: Fix irq flags
smsc9420: prevent BUG() if ethtool is called with interface down
r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
ipv4: additional update of dev_net(dev) to struct *net in ip_fragment.c, NULL ptr OOPS
e100: Use pci pool to work around GFP_ATOMIC order 5 memory allocation failure
sctp: on T3_RTX retransmit all the in-flight chunks
pktgen: Fix netdevice unregister
macvlan: fix gso_max_size setting
rfkill: fix miscdev ops
ath9k: set ps_default as false
hso: fix soft-lockup
hso: fix debug routines
pktgen: Fix device name compares
stmmac: do not fail when the timer cannot be used.
stmmac: fixed a compilation error when use the external timer
netfilter: xt_limit: fix invalid return code in limit_mt_check()
Au1x00: fix crash when trying register_netdev()
...
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 32 | ||||
-rw-r--r-- | net/ipv4/ip_fragment.c | 2 | ||||
-rw-r--r-- | net/mac80211/agg-tx.c | 18 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 8 | ||||
-rw-r--r-- | net/mac80211/util.c | 19 | ||||
-rw-r--r-- | net/netfilter/nf_log.c | 18 | ||||
-rw-r--r-- | net/netfilter/xt_limit.c | 2 | ||||
-rw-r--r-- | net/netfilter/xt_osf.c | 2 | ||||
-rw-r--r-- | net/rfkill/core.c | 1 | ||||
-rw-r--r-- | net/sctp/outqueue.c | 10 | ||||
-rw-r--r-- | net/sctp/sm_sideeffect.c | 1 | ||||
-rw-r--r-- | net/sctp/transport.c | 5 |
12 files changed, 56 insertions, 62 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 6eb8d47cbf3a..6e79e96cb4f2 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -363,6 +363,7 @@ struct pktgen_dev { | |||
363 | * device name (not when the inject is | 363 | * device name (not when the inject is |
364 | * started as it used to do.) | 364 | * started as it used to do.) |
365 | */ | 365 | */ |
366 | char odevname[32]; | ||
366 | struct flow_state *flows; | 367 | struct flow_state *flows; |
367 | unsigned cflows; /* Concurrent flows (config) */ | 368 | unsigned cflows; /* Concurrent flows (config) */ |
368 | unsigned lflow; /* Flow length (config) */ | 369 | unsigned lflow; /* Flow length (config) */ |
@@ -426,7 +427,7 @@ static const char version[] = | |||
426 | static int pktgen_remove_device(struct pktgen_thread *t, struct pktgen_dev *i); | 427 | static int pktgen_remove_device(struct pktgen_thread *t, struct pktgen_dev *i); |
427 | static int pktgen_add_device(struct pktgen_thread *t, const char *ifname); | 428 | static int pktgen_add_device(struct pktgen_thread *t, const char *ifname); |
428 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, | 429 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, |
429 | const char *ifname); | 430 | const char *ifname, bool exact); |
430 | static int pktgen_device_event(struct notifier_block *, unsigned long, void *); | 431 | static int pktgen_device_event(struct notifier_block *, unsigned long, void *); |
431 | static void pktgen_run_all_threads(void); | 432 | static void pktgen_run_all_threads(void); |
432 | static void pktgen_reset_all_threads(void); | 433 | static void pktgen_reset_all_threads(void); |
@@ -528,7 +529,7 @@ static int pktgen_if_show(struct seq_file *seq, void *v) | |||
528 | seq_printf(seq, | 529 | seq_printf(seq, |
529 | " frags: %d delay: %llu clone_skb: %d ifname: %s\n", | 530 | " frags: %d delay: %llu clone_skb: %d ifname: %s\n", |
530 | pkt_dev->nfrags, (unsigned long long) pkt_dev->delay, | 531 | pkt_dev->nfrags, (unsigned long long) pkt_dev->delay, |
531 | pkt_dev->clone_skb, pkt_dev->odev->name); | 532 | pkt_dev->clone_skb, pkt_dev->odevname); |
532 | 533 | ||
533 | seq_printf(seq, " flows: %u flowlen: %u\n", pkt_dev->cflows, | 534 | seq_printf(seq, " flows: %u flowlen: %u\n", pkt_dev->cflows, |
534 | pkt_dev->lflow); | 535 | pkt_dev->lflow); |
@@ -1688,13 +1689,13 @@ static int pktgen_thread_show(struct seq_file *seq, void *v) | |||
1688 | if_lock(t); | 1689 | if_lock(t); |
1689 | list_for_each_entry(pkt_dev, &t->if_list, list) | 1690 | list_for_each_entry(pkt_dev, &t->if_list, list) |
1690 | if (pkt_dev->running) | 1691 | if (pkt_dev->running) |
1691 | seq_printf(seq, "%s ", pkt_dev->odev->name); | 1692 | seq_printf(seq, "%s ", pkt_dev->odevname); |
1692 | 1693 | ||
1693 | seq_printf(seq, "\nStopped: "); | 1694 | seq_printf(seq, "\nStopped: "); |
1694 | 1695 | ||
1695 | list_for_each_entry(pkt_dev, &t->if_list, list) | 1696 | list_for_each_entry(pkt_dev, &t->if_list, list) |
1696 | if (!pkt_dev->running) | 1697 | if (!pkt_dev->running) |
1697 | seq_printf(seq, "%s ", pkt_dev->odev->name); | 1698 | seq_printf(seq, "%s ", pkt_dev->odevname); |
1698 | 1699 | ||
1699 | if (t->result[0]) | 1700 | if (t->result[0]) |
1700 | seq_printf(seq, "\nResult: %s\n", t->result); | 1701 | seq_printf(seq, "\nResult: %s\n", t->result); |
@@ -1817,9 +1818,10 @@ static struct pktgen_dev *__pktgen_NN_threads(const char *ifname, int remove) | |||
1817 | { | 1818 | { |
1818 | struct pktgen_thread *t; | 1819 | struct pktgen_thread *t; |
1819 | struct pktgen_dev *pkt_dev = NULL; | 1820 | struct pktgen_dev *pkt_dev = NULL; |
1821 | bool exact = (remove == FIND); | ||
1820 | 1822 | ||
1821 | list_for_each_entry(t, &pktgen_threads, th_list) { | 1823 | list_for_each_entry(t, &pktgen_threads, th_list) { |
1822 | pkt_dev = pktgen_find_dev(t, ifname); | 1824 | pkt_dev = pktgen_find_dev(t, ifname, exact); |
1823 | if (pkt_dev) { | 1825 | if (pkt_dev) { |
1824 | if (remove) { | 1826 | if (remove) { |
1825 | if_lock(t); | 1827 | if_lock(t); |
@@ -1994,7 +1996,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) | |||
1994 | "queue_map_min (zero-based) (%d) exceeds valid range " | 1996 | "queue_map_min (zero-based) (%d) exceeds valid range " |
1995 | "[0 - %d] for (%d) queues on %s, resetting\n", | 1997 | "[0 - %d] for (%d) queues on %s, resetting\n", |
1996 | pkt_dev->queue_map_min, (ntxq ?: 1) - 1, ntxq, | 1998 | pkt_dev->queue_map_min, (ntxq ?: 1) - 1, ntxq, |
1997 | pkt_dev->odev->name); | 1999 | pkt_dev->odevname); |
1998 | pkt_dev->queue_map_min = ntxq - 1; | 2000 | pkt_dev->queue_map_min = ntxq - 1; |
1999 | } | 2001 | } |
2000 | if (pkt_dev->queue_map_max >= ntxq) { | 2002 | if (pkt_dev->queue_map_max >= ntxq) { |
@@ -2002,7 +2004,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) | |||
2002 | "queue_map_max (zero-based) (%d) exceeds valid range " | 2004 | "queue_map_max (zero-based) (%d) exceeds valid range " |
2003 | "[0 - %d] for (%d) queues on %s, resetting\n", | 2005 | "[0 - %d] for (%d) queues on %s, resetting\n", |
2004 | pkt_dev->queue_map_max, (ntxq ?: 1) - 1, ntxq, | 2006 | pkt_dev->queue_map_max, (ntxq ?: 1) - 1, ntxq, |
2005 | pkt_dev->odev->name); | 2007 | pkt_dev->odevname); |
2006 | pkt_dev->queue_map_max = ntxq - 1; | 2008 | pkt_dev->queue_map_max = ntxq - 1; |
2007 | } | 2009 | } |
2008 | 2010 | ||
@@ -3262,7 +3264,7 @@ static int pktgen_stop_device(struct pktgen_dev *pkt_dev) | |||
3262 | 3264 | ||
3263 | if (!pkt_dev->running) { | 3265 | if (!pkt_dev->running) { |
3264 | printk(KERN_WARNING "pktgen: interface: %s is already " | 3266 | printk(KERN_WARNING "pktgen: interface: %s is already " |
3265 | "stopped\n", pkt_dev->odev->name); | 3267 | "stopped\n", pkt_dev->odevname); |
3266 | return -EINVAL; | 3268 | return -EINVAL; |
3267 | } | 3269 | } |
3268 | 3270 | ||
@@ -3464,7 +3466,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev) | |||
3464 | default: /* Drivers are not supposed to return other values! */ | 3466 | default: /* Drivers are not supposed to return other values! */ |
3465 | if (net_ratelimit()) | 3467 | if (net_ratelimit()) |
3466 | pr_info("pktgen: %s xmit error: %d\n", | 3468 | pr_info("pktgen: %s xmit error: %d\n", |
3467 | odev->name, ret); | 3469 | pkt_dev->odevname, ret); |
3468 | pkt_dev->errors++; | 3470 | pkt_dev->errors++; |
3469 | /* fallthru */ | 3471 | /* fallthru */ |
3470 | case NETDEV_TX_LOCKED: | 3472 | case NETDEV_TX_LOCKED: |
@@ -3566,13 +3568,18 @@ static int pktgen_thread_worker(void *arg) | |||
3566 | } | 3568 | } |
3567 | 3569 | ||
3568 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, | 3570 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, |
3569 | const char *ifname) | 3571 | const char *ifname, bool exact) |
3570 | { | 3572 | { |
3571 | struct pktgen_dev *p, *pkt_dev = NULL; | 3573 | struct pktgen_dev *p, *pkt_dev = NULL; |
3572 | if_lock(t); | 3574 | size_t len = strlen(ifname); |
3573 | 3575 | ||
3576 | if_lock(t); | ||
3574 | list_for_each_entry(p, &t->if_list, list) | 3577 | list_for_each_entry(p, &t->if_list, list) |
3575 | if (strncmp(p->odev->name, ifname, IFNAMSIZ) == 0) { | 3578 | if (strncmp(p->odevname, ifname, len) == 0) { |
3579 | if (p->odevname[len]) { | ||
3580 | if (exact || p->odevname[len] != '@') | ||
3581 | continue; | ||
3582 | } | ||
3576 | pkt_dev = p; | 3583 | pkt_dev = p; |
3577 | break; | 3584 | break; |
3578 | } | 3585 | } |
@@ -3628,6 +3635,7 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname) | |||
3628 | if (!pkt_dev) | 3635 | if (!pkt_dev) |
3629 | return -ENOMEM; | 3636 | return -ENOMEM; |
3630 | 3637 | ||
3638 | strcpy(pkt_dev->odevname, ifname); | ||
3631 | pkt_dev->flows = vmalloc(MAX_CFLOWS * sizeof(struct flow_state)); | 3639 | pkt_dev->flows = vmalloc(MAX_CFLOWS * sizeof(struct flow_state)); |
3632 | if (pkt_dev->flows == NULL) { | 3640 | if (pkt_dev->flows == NULL) { |
3633 | kfree(pkt_dev); | 3641 | kfree(pkt_dev); |
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 575f9bd51ccd..d3fe10be7219 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -563,7 +563,7 @@ out_oversize: | |||
563 | printk(KERN_INFO "Oversized IP packet from %pI4.\n", | 563 | printk(KERN_INFO "Oversized IP packet from %pI4.\n", |
564 | &qp->saddr); | 564 | &qp->saddr); |
565 | out_fail: | 565 | out_fail: |
566 | IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_REASMFAILS); | 566 | IP_INC_STATS_BH(net, IPSTATS_MIB_REASMFAILS); |
567 | return err; | 567 | return err; |
568 | } | 568 | } |
569 | 569 | ||
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index b09948ceec4a..206fd82f0c76 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -173,12 +173,14 @@ static void sta_addba_resp_timer_expired(unsigned long data) | |||
173 | 173 | ||
174 | /* check if the TID waits for addBA response */ | 174 | /* check if the TID waits for addBA response */ |
175 | spin_lock_bh(&sta->lock); | 175 | spin_lock_bh(&sta->lock); |
176 | if (!(*state & HT_ADDBA_REQUESTED_MSK)) { | 176 | if ((*state & (HT_ADDBA_REQUESTED_MSK | HT_ADDBA_RECEIVED_MSK)) != |
177 | HT_ADDBA_REQUESTED_MSK) { | ||
177 | spin_unlock_bh(&sta->lock); | 178 | spin_unlock_bh(&sta->lock); |
178 | *state = HT_AGG_STATE_IDLE; | 179 | *state = HT_AGG_STATE_IDLE; |
179 | #ifdef CONFIG_MAC80211_HT_DEBUG | 180 | #ifdef CONFIG_MAC80211_HT_DEBUG |
180 | printk(KERN_DEBUG "timer expired on tid %d but we are not " | 181 | printk(KERN_DEBUG "timer expired on tid %d but we are not " |
181 | "expecting addBA response there", tid); | 182 | "(or no longer) expecting addBA response there", |
183 | tid); | ||
182 | #endif | 184 | #endif |
183 | return; | 185 | return; |
184 | } | 186 | } |
@@ -666,21 +668,21 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, | |||
666 | 668 | ||
667 | state = &sta->ampdu_mlme.tid_state_tx[tid]; | 669 | state = &sta->ampdu_mlme.tid_state_tx[tid]; |
668 | 670 | ||
669 | del_timer_sync(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); | ||
670 | |||
671 | spin_lock_bh(&sta->lock); | 671 | spin_lock_bh(&sta->lock); |
672 | 672 | ||
673 | if (!(*state & HT_ADDBA_REQUESTED_MSK)) | 673 | if (!(*state & HT_ADDBA_REQUESTED_MSK)) |
674 | goto timer_still_needed; | 674 | goto out; |
675 | 675 | ||
676 | if (mgmt->u.action.u.addba_resp.dialog_token != | 676 | if (mgmt->u.action.u.addba_resp.dialog_token != |
677 | sta->ampdu_mlme.tid_tx[tid]->dialog_token) { | 677 | sta->ampdu_mlme.tid_tx[tid]->dialog_token) { |
678 | #ifdef CONFIG_MAC80211_HT_DEBUG | 678 | #ifdef CONFIG_MAC80211_HT_DEBUG |
679 | printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid); | 679 | printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid); |
680 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | 680 | #endif /* CONFIG_MAC80211_HT_DEBUG */ |
681 | goto timer_still_needed; | 681 | goto out; |
682 | } | 682 | } |
683 | 683 | ||
684 | del_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); | ||
685 | |||
684 | #ifdef CONFIG_MAC80211_HT_DEBUG | 686 | #ifdef CONFIG_MAC80211_HT_DEBUG |
685 | printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid); | 687 | printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid); |
686 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | 688 | #endif /* CONFIG_MAC80211_HT_DEBUG */ |
@@ -699,10 +701,6 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, | |||
699 | ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); | 701 | ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); |
700 | } | 702 | } |
701 | 703 | ||
702 | goto out; | ||
703 | |||
704 | timer_still_needed: | ||
705 | add_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); | ||
706 | out: | 704 | out: |
707 | spin_unlock_bh(&sta->lock); | 705 | spin_unlock_bh(&sta->lock); |
708 | } | 706 | } |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 588005c84a6d..a910bf1f092f 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -662,6 +662,14 @@ struct ieee80211_local { | |||
662 | bool suspended; | 662 | bool suspended; |
663 | 663 | ||
664 | /* | 664 | /* |
665 | * Resuming is true while suspended, but when we're reprogramming the | ||
666 | * hardware -- at that time it's allowed to use ieee80211_queue_work() | ||
667 | * again even though some other parts of the stack are still suspended | ||
668 | * and we still drop received frames to avoid waking the stack. | ||
669 | */ | ||
670 | bool resuming; | ||
671 | |||
672 | /* | ||
665 | * quiescing is true during the suspend process _only_ to | 673 | * quiescing is true during the suspend process _only_ to |
666 | * ease timer cancelling etc. | 674 | * ease timer cancelling etc. |
667 | */ | 675 | */ |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index aeb65b3d2295..e6c08da8da26 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -520,9 +520,9 @@ EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); | |||
520 | */ | 520 | */ |
521 | static bool ieee80211_can_queue_work(struct ieee80211_local *local) | 521 | static bool ieee80211_can_queue_work(struct ieee80211_local *local) |
522 | { | 522 | { |
523 | if (WARN(local->suspended, "queueing ieee80211 work while " | 523 | if (WARN(local->suspended && !local->resuming, |
524 | "going to suspend\n")) | 524 | "queueing ieee80211 work while going to suspend\n")) |
525 | return false; | 525 | return false; |
526 | 526 | ||
527 | return true; | 527 | return true; |
528 | } | 528 | } |
@@ -1025,13 +1025,9 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1025 | struct sta_info *sta; | 1025 | struct sta_info *sta; |
1026 | unsigned long flags; | 1026 | unsigned long flags; |
1027 | int res; | 1027 | int res; |
1028 | bool from_suspend = local->suspended; | ||
1029 | 1028 | ||
1030 | /* | 1029 | if (local->suspended) |
1031 | * We're going to start the hardware, at that point | 1030 | local->resuming = true; |
1032 | * we are no longer suspended and can RX frames. | ||
1033 | */ | ||
1034 | local->suspended = false; | ||
1035 | 1031 | ||
1036 | /* restart hardware */ | 1032 | /* restart hardware */ |
1037 | if (local->open_count) { | 1033 | if (local->open_count) { |
@@ -1129,11 +1125,14 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1129 | * If this is for hw restart things are still running. | 1125 | * If this is for hw restart things are still running. |
1130 | * We may want to change that later, however. | 1126 | * We may want to change that later, however. |
1131 | */ | 1127 | */ |
1132 | if (!from_suspend) | 1128 | if (!local->suspended) |
1133 | return 0; | 1129 | return 0; |
1134 | 1130 | ||
1135 | #ifdef CONFIG_PM | 1131 | #ifdef CONFIG_PM |
1132 | /* first set suspended false, then resuming */ | ||
1136 | local->suspended = false; | 1133 | local->suspended = false; |
1134 | mb(); | ||
1135 | local->resuming = false; | ||
1137 | 1136 | ||
1138 | list_for_each_entry(sdata, &local->interfaces, list) { | 1137 | list_for_each_entry(sdata, &local->interfaces, list) { |
1139 | switch(sdata->vif.type) { | 1138 | switch(sdata->vif.type) { |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index c93494fef8ef..d65d3481919c 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
@@ -128,9 +128,8 @@ EXPORT_SYMBOL(nf_log_packet); | |||
128 | 128 | ||
129 | #ifdef CONFIG_PROC_FS | 129 | #ifdef CONFIG_PROC_FS |
130 | static void *seq_start(struct seq_file *seq, loff_t *pos) | 130 | static void *seq_start(struct seq_file *seq, loff_t *pos) |
131 | __acquires(RCU) | ||
132 | { | 131 | { |
133 | rcu_read_lock(); | 132 | mutex_lock(&nf_log_mutex); |
134 | 133 | ||
135 | if (*pos >= ARRAY_SIZE(nf_loggers)) | 134 | if (*pos >= ARRAY_SIZE(nf_loggers)) |
136 | return NULL; | 135 | return NULL; |
@@ -149,9 +148,8 @@ static void *seq_next(struct seq_file *s, void *v, loff_t *pos) | |||
149 | } | 148 | } |
150 | 149 | ||
151 | static void seq_stop(struct seq_file *s, void *v) | 150 | static void seq_stop(struct seq_file *s, void *v) |
152 | __releases(RCU) | ||
153 | { | 151 | { |
154 | rcu_read_unlock(); | 152 | mutex_unlock(&nf_log_mutex); |
155 | } | 153 | } |
156 | 154 | ||
157 | static int seq_show(struct seq_file *s, void *v) | 155 | static int seq_show(struct seq_file *s, void *v) |
@@ -161,7 +159,7 @@ static int seq_show(struct seq_file *s, void *v) | |||
161 | struct nf_logger *t; | 159 | struct nf_logger *t; |
162 | int ret; | 160 | int ret; |
163 | 161 | ||
164 | logger = rcu_dereference(nf_loggers[*pos]); | 162 | logger = nf_loggers[*pos]; |
165 | 163 | ||
166 | if (!logger) | 164 | if (!logger) |
167 | ret = seq_printf(s, "%2lld NONE (", *pos); | 165 | ret = seq_printf(s, "%2lld NONE (", *pos); |
@@ -171,22 +169,16 @@ static int seq_show(struct seq_file *s, void *v) | |||
171 | if (ret < 0) | 169 | if (ret < 0) |
172 | return ret; | 170 | return ret; |
173 | 171 | ||
174 | mutex_lock(&nf_log_mutex); | ||
175 | list_for_each_entry(t, &nf_loggers_l[*pos], list[*pos]) { | 172 | list_for_each_entry(t, &nf_loggers_l[*pos], list[*pos]) { |
176 | ret = seq_printf(s, "%s", t->name); | 173 | ret = seq_printf(s, "%s", t->name); |
177 | if (ret < 0) { | 174 | if (ret < 0) |
178 | mutex_unlock(&nf_log_mutex); | ||
179 | return ret; | 175 | return ret; |
180 | } | ||
181 | if (&t->list[*pos] != nf_loggers_l[*pos].prev) { | 176 | if (&t->list[*pos] != nf_loggers_l[*pos].prev) { |
182 | ret = seq_printf(s, ","); | 177 | ret = seq_printf(s, ","); |
183 | if (ret < 0) { | 178 | if (ret < 0) |
184 | mutex_unlock(&nf_log_mutex); | ||
185 | return ret; | 179 | return ret; |
186 | } | ||
187 | } | 180 | } |
188 | } | 181 | } |
189 | mutex_unlock(&nf_log_mutex); | ||
190 | 182 | ||
191 | return seq_printf(s, ")\n"); | 183 | return seq_printf(s, ")\n"); |
192 | } | 184 | } |
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c index 2e8089ecd0af..2773be6a71dd 100644 --- a/net/netfilter/xt_limit.c +++ b/net/netfilter/xt_limit.c | |||
@@ -112,7 +112,7 @@ static bool limit_mt_check(const struct xt_mtchk_param *par) | |||
112 | 112 | ||
113 | priv = kmalloc(sizeof(*priv), GFP_KERNEL); | 113 | priv = kmalloc(sizeof(*priv), GFP_KERNEL); |
114 | if (priv == NULL) | 114 | if (priv == NULL) |
115 | return -ENOMEM; | 115 | return false; |
116 | 116 | ||
117 | /* For SMP, we only want to use one set of state. */ | 117 | /* For SMP, we only want to use one set of state. */ |
118 | r->master = priv; | 118 | r->master = priv; |
diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c index 63e190504656..4d1a41bbd5d7 100644 --- a/net/netfilter/xt_osf.c +++ b/net/netfilter/xt_osf.c | |||
@@ -118,7 +118,7 @@ static int xt_osf_remove_callback(struct sock *ctnl, struct sk_buff *skb, | |||
118 | { | 118 | { |
119 | struct xt_osf_user_finger *f; | 119 | struct xt_osf_user_finger *f; |
120 | struct xt_osf_finger *sf; | 120 | struct xt_osf_finger *sf; |
121 | int err = ENOENT; | 121 | int err = -ENOENT; |
122 | 122 | ||
123 | if (!osf_attrs[OSF_ATTR_FINGER]) | 123 | if (!osf_attrs[OSF_ATTR_FINGER]) |
124 | return -EINVAL; | 124 | return -EINVAL; |
diff --git a/net/rfkill/core.c b/net/rfkill/core.c index ba2efb960c60..a001f7c1f711 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c | |||
@@ -1189,6 +1189,7 @@ static long rfkill_fop_ioctl(struct file *file, unsigned int cmd, | |||
1189 | #endif | 1189 | #endif |
1190 | 1190 | ||
1191 | static const struct file_operations rfkill_fops = { | 1191 | static const struct file_operations rfkill_fops = { |
1192 | .owner = THIS_MODULE, | ||
1192 | .open = rfkill_fop_open, | 1193 | .open = rfkill_fop_open, |
1193 | .read = rfkill_fop_read, | 1194 | .read = rfkill_fop_read, |
1194 | .write = rfkill_fop_write, | 1195 | .write = rfkill_fop_write, |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index c9f20e28521b..23e5e97aa617 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -423,16 +423,6 @@ void sctp_retransmit_mark(struct sctp_outq *q, | |||
423 | if ((reason == SCTP_RTXR_FAST_RTX && | 423 | if ((reason == SCTP_RTXR_FAST_RTX && |
424 | (chunk->fast_retransmit == SCTP_NEED_FRTX)) || | 424 | (chunk->fast_retransmit == SCTP_NEED_FRTX)) || |
425 | (reason != SCTP_RTXR_FAST_RTX && !chunk->tsn_gap_acked)) { | 425 | (reason != SCTP_RTXR_FAST_RTX && !chunk->tsn_gap_acked)) { |
426 | /* If this chunk was sent less then 1 rto ago, do not | ||
427 | * retransmit this chunk, but give the peer time | ||
428 | * to acknowlege it. Do this only when | ||
429 | * retransmitting due to T3 timeout. | ||
430 | */ | ||
431 | if (reason == SCTP_RTXR_T3_RTX && | ||
432 | time_before(jiffies, chunk->sent_at + | ||
433 | transport->last_rto)) | ||
434 | continue; | ||
435 | |||
436 | /* RFC 2960 6.2.1 Processing a Received SACK | 426 | /* RFC 2960 6.2.1 Processing a Received SACK |
437 | * | 427 | * |
438 | * C) Any time a DATA chunk is marked for | 428 | * C) Any time a DATA chunk is marked for |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 8674d4919556..efa516b47e81 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -480,7 +480,6 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc, | |||
480 | * that indicates that we have an outstanding HB. | 480 | * that indicates that we have an outstanding HB. |
481 | */ | 481 | */ |
482 | if (!is_hb || transport->hb_sent) { | 482 | if (!is_hb || transport->hb_sent) { |
483 | transport->last_rto = transport->rto; | ||
484 | transport->rto = min((transport->rto * 2), transport->asoc->rto_max); | 483 | transport->rto = min((transport->rto * 2), transport->asoc->rto_max); |
485 | } | 484 | } |
486 | } | 485 | } |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 3b141bb32faf..37a1184d789f 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -74,7 +74,7 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
74 | * given destination transport address, set RTO to the protocol | 74 | * given destination transport address, set RTO to the protocol |
75 | * parameter 'RTO.Initial'. | 75 | * parameter 'RTO.Initial'. |
76 | */ | 76 | */ |
77 | peer->last_rto = peer->rto = msecs_to_jiffies(sctp_rto_initial); | 77 | peer->rto = msecs_to_jiffies(sctp_rto_initial); |
78 | peer->rtt = 0; | 78 | peer->rtt = 0; |
79 | peer->rttvar = 0; | 79 | peer->rttvar = 0; |
80 | peer->srtt = 0; | 80 | peer->srtt = 0; |
@@ -386,7 +386,6 @@ void sctp_transport_update_rto(struct sctp_transport *tp, __u32 rtt) | |||
386 | tp->rto = tp->asoc->rto_max; | 386 | tp->rto = tp->asoc->rto_max; |
387 | 387 | ||
388 | tp->rtt = rtt; | 388 | tp->rtt = rtt; |
389 | tp->last_rto = tp->rto; | ||
390 | 389 | ||
391 | /* Reset rto_pending so that a new RTT measurement is started when a | 390 | /* Reset rto_pending so that a new RTT measurement is started when a |
392 | * new data chunk is sent. | 391 | * new data chunk is sent. |
@@ -602,7 +601,7 @@ void sctp_transport_reset(struct sctp_transport *t) | |||
602 | */ | 601 | */ |
603 | t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380)); | 602 | t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380)); |
604 | t->ssthresh = asoc->peer.i.a_rwnd; | 603 | t->ssthresh = asoc->peer.i.a_rwnd; |
605 | t->last_rto = t->rto = asoc->rto_initial; | 604 | t->rto = asoc->rto_initial; |
606 | t->rtt = 0; | 605 | t->rtt = 0; |
607 | t->srtt = 0; | 606 | t->srtt = 0; |
608 | t->rttvar = 0; | 607 | t->rttvar = 0; |