summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2015-05-31 10:35:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-03 09:28:59 -0700
commitc79d02758654aeef5448f9b42952e699dd2c5463 (patch)
treea1b5df4e9b457abccb84f6c18a24d6f6be56e66c /drivers/staging
parenta225aecb12853c4231aac1dc2927755bb2a068a1 (diff)
staging: vt6655: device_rx_srv check sk_buff is NULL
commit b5eeed8cb6097c8ea660b6598d36fdbb94065a22 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/vt6655/device_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 9e0278ee003f..15baacb126ad 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -807,6 +807,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,