]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: Avoids race and deadlock while freeing tx descriptor
authorHariprasad Shenai <hariprasad@chelsio.com>
Tue, 26 Apr 2016 14:40:24 +0000 (20:10 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Apr 2016 17:23:57 +0000 (13:23 -0400)
commitfd5161a0da12f52d7af58edc5f587e9681d85fb6
treec01c9b317a8c060e5bde68e0f66c399a2b922af5
parent9b720d199baf0cf32d32d85757b501cbb4993012
cxgb4: Avoids race and deadlock while freeing tx descriptor

There could be race between t4_eth_xmit() and t4_free_sge_resources() while
freeing tx descriptors, take txq lock in t4_free_sge_resources(). We need
to stop the xmit frame path which runs in bottom half context while
unloading the driver using _bh variant of the lock. This is to prevent
the deadlock between xmit and driver unload.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/sge.c