Commit 6d06b342 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sir_dev locking fix

From: Martin Diehl <lists@mdiehl.de>

There was a spin_unlock missing in the raw mode tx-completion path.  Probably
it slipped through because the raw mode stuff is never reached with my Actisys
hardware.
parent 2c81f2e4
...@@ -163,10 +163,8 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -163,10 +163,8 @@ void sirdev_write_complete(struct sir_dev *dev)
} }
dev->tx_buff.len = 0; dev->tx_buff.len = 0;
} }
if (dev->tx_buff.len > 0) { if (dev->tx_buff.len > 0)
spin_unlock_irqrestore(&dev->tx_lock, flags); goto done; /* more data to send later */
return;
}
} }
if (unlikely(dev->raw_tx != 0)) { if (unlikely(dev->raw_tx != 0)) {
...@@ -179,7 +177,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -179,7 +177,7 @@ void sirdev_write_complete(struct sir_dev *dev)
IRDA_DEBUG(3, "%s(), raw-tx done\n", __FUNCTION__); IRDA_DEBUG(3, "%s(), raw-tx done\n", __FUNCTION__);
dev->raw_tx = 0; dev->raw_tx = 0;
return; goto done; /* no post-frame handling in raw mode */
} }
/* we have finished now sending this skb. /* we have finished now sending this skb.
...@@ -224,6 +222,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -224,6 +222,7 @@ void sirdev_write_complete(struct sir_dev *dev)
netif_wake_queue(dev->netdev); netif_wake_queue(dev->netdev);
} }
done:
spin_unlock_irqrestore(&dev->tx_lock, flags); spin_unlock_irqrestore(&dev->tx_lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment