staging: vt6655: device_rx_srv check sk_buff is NULL
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 31 May 2015 09:35:28 +0000 (10:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 May 2015 21:24:58 +0000 (06:24 +0900)
There is a small chance that pRD->pRDInfo->skb could go NULL
while the interrupt is processing.

Put NULL check on loop to break out.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/device_main.c

index aec3ccec2231749570a736532105840d889d3a4d..8dbde24eb154aa0bd700e0c471125effca8df4fe 100644 (file)
@@ -805,6 +805,10 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx)
             pRD = pRD->next) {
                if (works++ > 15)
                        break;
+
+               if (!pRD->pRDInfo->skb)
+                       break;
+
                if (vnt_receive_frame(pDevice, pRD)) {
                        if (!device_alloc_rx_buf(pDevice, pRD)) {
                                dev_err(&pDevice->pcid->dev,