staging: vt6656: s_nsBulkInUsbIoCompleteRead check that used sk_buff is clean and...
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 6 Jul 2014 22:19:46 +0000 (23:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 23:04:22 +0000 (16:04 -0700)
skb_push the headroom and trimmed back to 0

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/usbpipe.c

index c8b0ed5..dd031bb 100644 (file)
@@ -303,6 +303,9 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
                                spin_unlock_irqrestore(&priv->lock, flags);
                                return;
                        }
+               } else {
+                       skb_push(rcb->skb, skb_headroom(rcb->skb));
+                       skb_trim(rcb->skb, 0);
                }
 
                urb->transfer_buffer = skb_put(rcb->skb,