staging: vt6656: rxtx.c [BUG] s_vGetFreeContext dead lock on null apTD.
PATCH 1/1 staging: vt6656: rxtx.c [BUG] s_vGetFreeContext dead lock on null apTD.
There seems to be race condition that the device is ndo_start_xmit at a point where the device is closing and apTD is NULL resulting in dead lock.
Add a NULL check to apTD and return NULL to calling functions.
This is more likely on 64 bit systems.
Signed-off-by Malcolm Priestley <[email protected]>
--- drivers/staging/vt6656/rxtx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/vt6656/rxtx.c +2 -0
@@ -148,6 +148,8 @@ static void *s_vGetFreeContext(struct vnt_private *pDevice)DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "GetFreeContext()\n" );for (ii =0 ; ii < pDevice->cbTD; ii++) { +if (!pDevice->apTD[ii]) +return NULL ; pContext = pDevice->apTD[ii];if (pContext->bBoolInUse == false) { pContext->bBoolInUse = true;
Signature · 1 line
1.8.3.2