Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=661afcae1b6b6493e4ea69f81bae78397c066f25
Commit:     661afcae1b6b6493e4ea69f81bae78397c066f25
Parent:     3bd90303f05d24487759e4990c3fed3e7a6b6955
Author:     Stefan Richter <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 28 23:45:03 2007 +0200
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 23:59:54 2007 +0200

    ieee1394: eth1394: fix lock imbalance
    
    bad_proto can be reached from points which did not take priv->lock.
    
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
 drivers/ieee1394/eth1394.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index 7aa0bf3..b166b35 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -1220,23 +1220,19 @@ static int ether1394_data_handler(struct net_device 
*dev, int srcid, int destid,
                priv->stats.rx_errors++;
                priv->stats.rx_dropped++;
                dev_kfree_skb_any(skb);
-               goto bad_proto;
-       }
-
-       if (netif_rx(skb) == NET_RX_DROP) {
+       } else if (netif_rx(skb) == NET_RX_DROP) {
                priv->stats.rx_errors++;
                priv->stats.rx_dropped++;
-               goto bad_proto;
+       } else {
+               priv->stats.rx_packets++;
+               priv->stats.rx_bytes += skb->len;
        }
 
-       /* Statistics */
-       priv->stats.rx_packets++;
-       priv->stats.rx_bytes += skb->len;
+       spin_unlock_irqrestore(&priv->lock, flags);
 
 bad_proto:
        if (netif_queue_stopped(dev))
                netif_wake_queue(dev);
-       spin_unlock_irqrestore(&priv->lock, flags);
 
        dev->last_rx = jiffies;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to