ieee1394: eth1394: fix lock imbalance
bad_proto can be reached from points which did not take priv->lock. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
parent
3bd90303f0
commit
661afcae1b
@ -1220,23 +1220,19 @@ static int ether1394_data_handler(struct net_device *dev, int srcid, int destid,
|
|||||||
priv->stats.rx_errors++;
|
priv->stats.rx_errors++;
|
||||||
priv->stats.rx_dropped++;
|
priv->stats.rx_dropped++;
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
goto bad_proto;
|
} else if (netif_rx(skb) == NET_RX_DROP) {
|
||||||
}
|
|
||||||
|
|
||||||
if (netif_rx(skb) == NET_RX_DROP) {
|
|
||||||
priv->stats.rx_errors++;
|
priv->stats.rx_errors++;
|
||||||
priv->stats.rx_dropped++;
|
priv->stats.rx_dropped++;
|
||||||
goto bad_proto;
|
} else {
|
||||||
|
priv->stats.rx_packets++;
|
||||||
|
priv->stats.rx_bytes += skb->len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Statistics */
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
priv->stats.rx_packets++;
|
|
||||||
priv->stats.rx_bytes += skb->len;
|
|
||||||
|
|
||||||
bad_proto:
|
bad_proto:
|
||||||
if (netif_queue_stopped(dev))
|
if (netif_queue_stopped(dev))
|
||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
spin_unlock_irqrestore(&priv->lock, flags);
|
|
||||||
|
|
||||||
dev->last_rx = jiffies;
|
dev->last_rx = jiffies;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user