Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: vt6655: device_rx_srv check sk_buff is NULL

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>

authored by

Malcolm Priestley and committed by
Greg Kroah-Hartman
b5eeed8c 41b9e5e5

+4
+4
drivers/staging/vt6655/device_main.c
··· 805 805 pRD = pRD->next) { 806 806 if (works++ > 15) 807 807 break; 808 + 809 + if (!pRD->pRDInfo->skb) 810 + break; 811 + 808 812 if (vnt_receive_frame(pDevice, pRD)) { 809 813 if (!device_alloc_rx_buf(pDevice, pRD)) { 810 814 dev_err(&pDevice->pcid->dev,