rapidio/rionet: fix deadlock on SMP
commit 36915976eca58f2eefa040ba8f9939672564df61 upstream. Fix deadlocking during concurrent receive and transmit operations on SMP platforms caused by the use of incorrect lock: on transmit 'tx_lock' spinlock should be used instead of 'lock' which is used for receive operation. This fix is applicable to kernel versions starting from v2.15. Signed-off-by: Aurelien Jacquiot <a-jacquiot@ti.com> Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
74b23f79f1
commit
91b95d59aa
1 changed files with 2 additions and 2 deletions
|
@ -280,7 +280,7 @@ static void rionet_outb_msg_event(struct rio_mport *mport, void *dev_id, int mbo
|
||||||
struct net_device *ndev = dev_id;
|
struct net_device *ndev = dev_id;
|
||||||
struct rionet_private *rnet = netdev_priv(ndev);
|
struct rionet_private *rnet = netdev_priv(ndev);
|
||||||
|
|
||||||
spin_lock(&rnet->lock);
|
spin_lock(&rnet->tx_lock);
|
||||||
|
|
||||||
if (netif_msg_intr(rnet))
|
if (netif_msg_intr(rnet))
|
||||||
printk(KERN_INFO
|
printk(KERN_INFO
|
||||||
|
@ -299,7 +299,7 @@ static void rionet_outb_msg_event(struct rio_mport *mport, void *dev_id, int mbo
|
||||||
if (rnet->tx_cnt < RIONET_TX_RING_SIZE)
|
if (rnet->tx_cnt < RIONET_TX_RING_SIZE)
|
||||||
netif_wake_queue(ndev);
|
netif_wake_queue(ndev);
|
||||||
|
|
||||||
spin_unlock(&rnet->lock);
|
spin_unlock(&rnet->tx_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rionet_open(struct net_device *ndev)
|
static int rionet_open(struct net_device *ndev)
|
||||||
|
|
Loading…
Add table
Reference in a new issue