diff options
author | Aurelien Jacquiot <a-jacquiot@ti.com> | 2016-03-22 17:25:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-22 18:36:02 -0400 |
commit | 36915976eca58f2eefa040ba8f9939672564df61 (patch) | |
tree | 8d89826c7a16c53870d898c5a7f6a7c13f5a790b /drivers/net/rionet.c | |
parent | 95f27356e4a8982257ecae6bc44c650772d77659 (diff) |
rapidio/rionet: fix deadlock on SMP
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/rionet.c')
-rw-r--r-- | drivers/net/rionet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index 01f08a7751f7..e7034c55e796 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c | |||
@@ -280,7 +280,7 @@ static void rionet_outb_msg_event(struct rio_mport *mport, void *dev_id, int mbo | |||
280 | struct net_device *ndev = dev_id; | 280 | struct net_device *ndev = dev_id; |
281 | struct rionet_private *rnet = netdev_priv(ndev); | 281 | struct rionet_private *rnet = netdev_priv(ndev); |
282 | 282 | ||
283 | spin_lock(&rnet->lock); | 283 | spin_lock(&rnet->tx_lock); |
284 | 284 | ||
285 | if (netif_msg_intr(rnet)) | 285 | if (netif_msg_intr(rnet)) |
286 | printk(KERN_INFO | 286 | printk(KERN_INFO |
@@ -299,7 +299,7 @@ static void rionet_outb_msg_event(struct rio_mport *mport, void *dev_id, int mbo | |||
299 | if (rnet->tx_cnt < RIONET_TX_RING_SIZE) | 299 | if (rnet->tx_cnt < RIONET_TX_RING_SIZE) |
300 | netif_wake_queue(ndev); | 300 | netif_wake_queue(ndev); |
301 | 301 | ||
302 | spin_unlock(&rnet->lock); | 302 | spin_unlock(&rnet->tx_lock); |
303 | } | 303 | } |
304 | 304 | ||
305 | static int rionet_open(struct net_device *ndev) | 305 | static int rionet_open(struct net_device *ndev) |