aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-10 20:22:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-10 20:22:16 -0400
commit9631eb0bc18bc1fd1cc84e535260d67ed6a36865 (patch)
tree4035e815fe051d0c357a10c4201c0fca2ffdbdcd
parentb4dfd6bc35f6c1e0fcbb4268c523b3939955d3af (diff)
parent50c9cc2e540aeaab78ab548a8d42568977c6844f (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER]: ipt_CLUSTERIP: fix oops in checkentry function [TCP]: slow_start_after_idle should influence cwnd validation too [SC92031]: Fix priv->lock context [NET_SCHED]: cls_tcindex: fix compatibility breakage
-rw-r--r--drivers/net/sc92031.c20
-rw-r--r--net/ipv4/netfilter/ipt_CLUSTERIP.c2
-rw-r--r--net/ipv4/tcp_output.c3
-rw-r--r--net/sched/cls_tcindex.c4
4 files changed, 14 insertions, 15 deletions
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index 4a926f20b6ea..c32c21af3fdd 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -964,7 +964,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
964 goto out; 964 goto out;
965 } 965 }
966 966
967 spin_lock_bh(&priv->lock); 967 spin_lock(&priv->lock);
968 968
969 if (unlikely(!netif_carrier_ok(dev))) { 969 if (unlikely(!netif_carrier_ok(dev))) {
970 err = -ENOLINK; 970 err = -ENOLINK;
@@ -1005,7 +1005,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
1005 netif_stop_queue(dev); 1005 netif_stop_queue(dev);
1006 1006
1007out_unlock: 1007out_unlock:
1008 spin_unlock_bh(&priv->lock); 1008 spin_unlock(&priv->lock);
1009 1009
1010out: 1010out:
1011 dev_kfree_skb(skb); 1011 dev_kfree_skb(skb);
@@ -1042,12 +1042,12 @@ static int sc92031_open(struct net_device *dev)
1042 priv->pm_config = 0; 1042 priv->pm_config = 0;
1043 1043
1044 /* Interrupts already disabled by sc92031_stop or sc92031_probe */ 1044 /* Interrupts already disabled by sc92031_stop or sc92031_probe */
1045 spin_lock(&priv->lock); 1045 spin_lock_bh(&priv->lock);
1046 1046
1047 _sc92031_reset(dev); 1047 _sc92031_reset(dev);
1048 mmiowb(); 1048 mmiowb();
1049 1049
1050 spin_unlock(&priv->lock); 1050 spin_unlock_bh(&priv->lock);
1051 sc92031_enable_interrupts(dev); 1051 sc92031_enable_interrupts(dev);
1052 1052
1053 if (netif_carrier_ok(dev)) 1053 if (netif_carrier_ok(dev))
@@ -1077,13 +1077,13 @@ static int sc92031_stop(struct net_device *dev)
1077 /* Disable interrupts, stop Tx and Rx. */ 1077 /* Disable interrupts, stop Tx and Rx. */
1078 sc92031_disable_interrupts(dev); 1078 sc92031_disable_interrupts(dev);
1079 1079
1080 spin_lock(&priv->lock); 1080 spin_lock_bh(&priv->lock);
1081 1081
1082 _sc92031_disable_tx_rx(dev); 1082 _sc92031_disable_tx_rx(dev);
1083 _sc92031_tx_clear(dev); 1083 _sc92031_tx_clear(dev);
1084 mmiowb(); 1084 mmiowb();
1085 1085
1086 spin_unlock(&priv->lock); 1086 spin_unlock_bh(&priv->lock);
1087 1087
1088 free_irq(pdev->irq, dev); 1088 free_irq(pdev->irq, dev);
1089 pci_free_consistent(pdev, TX_BUF_TOT_LEN, priv->tx_bufs, 1089 pci_free_consistent(pdev, TX_BUF_TOT_LEN, priv->tx_bufs,
@@ -1539,13 +1539,13 @@ static int sc92031_suspend(struct pci_dev *pdev, pm_message_t state)
1539 /* Disable interrupts, stop Tx and Rx. */ 1539 /* Disable interrupts, stop Tx and Rx. */
1540 sc92031_disable_interrupts(dev); 1540 sc92031_disable_interrupts(dev);
1541 1541
1542 spin_lock(&priv->lock); 1542 spin_lock_bh(&priv->lock);
1543 1543
1544 _sc92031_disable_tx_rx(dev); 1544 _sc92031_disable_tx_rx(dev);
1545 _sc92031_tx_clear(dev); 1545 _sc92031_tx_clear(dev);
1546 mmiowb(); 1546 mmiowb();
1547 1547
1548 spin_unlock(&priv->lock); 1548 spin_unlock_bh(&priv->lock);
1549 1549
1550out: 1550out:
1551 pci_set_power_state(pdev, pci_choose_state(pdev, state)); 1551 pci_set_power_state(pdev, pci_choose_state(pdev, state));
@@ -1565,12 +1565,12 @@ static int sc92031_resume(struct pci_dev *pdev)
1565 goto out; 1565 goto out;
1566 1566
1567 /* Interrupts already disabled by sc92031_suspend */ 1567 /* Interrupts already disabled by sc92031_suspend */
1568 spin_lock(&priv->lock); 1568 spin_lock_bh(&priv->lock);
1569 1569
1570 _sc92031_reset(dev); 1570 _sc92031_reset(dev);
1571 mmiowb(); 1571 mmiowb();
1572 1572
1573 spin_unlock(&priv->lock); 1573 spin_unlock_bh(&priv->lock);
1574 sc92031_enable_interrupts(dev); 1574 sc92031_enable_interrupts(dev);
1575 1575
1576 netif_device_attach(dev); 1576 netif_device_attach(dev);
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index e965b333c997..42b08029e867 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -411,12 +411,10 @@ checkentry(const char *tablename,
411 "has invalid config pointer!\n"); 411 "has invalid config pointer!\n");
412 return 0; 412 return 0;
413 } 413 }
414 clusterip_config_entry_get(cipinfo->config);
415 } else { 414 } else {
416 /* Case B: This is a new rule referring to an existing 415 /* Case B: This is a new rule referring to an existing
417 * clusterip config. */ 416 * clusterip config. */
418 cipinfo->config = config; 417 cipinfo->config = config;
419 clusterip_config_entry_get(cipinfo->config);
420 } 418 }
421 } else { 419 } else {
422 /* Case C: This is a completely new clusterip config */ 420 /* Case C: This is a completely new clusterip config */
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 688b95594f2e..3c24881f2a65 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -943,7 +943,8 @@ static void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp)
943 if (tp->packets_out > tp->snd_cwnd_used) 943 if (tp->packets_out > tp->snd_cwnd_used)
944 tp->snd_cwnd_used = tp->packets_out; 944 tp->snd_cwnd_used = tp->packets_out;
945 945
946 if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto) 946 if (sysctl_tcp_slow_start_after_idle &&
947 (s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto)
947 tcp_cwnd_application_limited(sk); 948 tcp_cwnd_application_limited(sk);
948 } 949 }
949} 950}
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 040e2d2d281a..7563fdcef4b7 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -245,9 +245,9 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
245 } 245 }
246 246
247 if (tb[TCA_TCINDEX_SHIFT-1]) { 247 if (tb[TCA_TCINDEX_SHIFT-1]) {
248 if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(u16)) 248 if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(int))
249 goto errout; 249 goto errout;
250 cp.shift = *(u16 *) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]); 250 cp.shift = *(int *) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]);
251 } 251 }
252 252
253 err = -EBUSY; 253 err = -EBUSY;