summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2015-05-31 12:35:28 +0300
committerSasha Levin <sasha.levin@oracle.com>2015-07-04 06:02:22 +0300
commit05e308140f6b33f08033e079e7c168ebadde588b (patch)
tree260a937a02c5fed3008fe6eafbde228505f02d2c /drivers/staging
parentd83de3f9798fe8349fbcb61a7a5ea34f2cd80cba (diff)
downloadlinux-05e308140f6b33f08033e079e7c168ebadde588b.tar.xz
staging: vt6655: device_rx_srv check sk_buff is NULL
[ Upstream commit b5eeed8cb6097c8ea660b6598d36fdbb94065a22 ] 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> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
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 54e16f40d8ed..ea240512cbbb 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1340,6 +1340,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 (device_receive_frame(pDevice, pRD)) {
if (!device_alloc_rx_buf(pDevice, pRD)) {
dev_err(&pDevice->pcid->dev,