]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Fix a race when closing TX queue
authorAmir Vadai <amirv@mellanox.com>
Thu, 24 Jan 2013 01:54:18 +0000 (01:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2013 05:14:24 +0000 (00:14 -0500)
commite6e3ca71a5de8b2aa6be06b4388bfde990e377ed
tree2a3871ca8287e5f197c39d170375df8fe3c93b03
parent3542e625522d68fc0dae497624cf0fee622dbc82
net/mlx4_en: Fix a race when closing TX queue

There is a possible race where the TX completion handler can clean the
entire TX queue between the decision that the queue is full and actually
closing it. To avoid this situation, check again if the queue is really
full, if not, reopen the transmit and continue with sending the packet.

CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.com>
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c