Skip to content

Commit

Permalink
ieee1394: eth1394: fix lock imbalance
Browse files Browse the repository at this point in the history
bad_proto can be reached from points which did not take priv->lock.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Stefan Richter committed Oct 16, 2007
1 parent 3bd9030 commit 661afca
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions drivers/ieee1394/eth1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 661afca

Please sign in to comment.