staging: usbip: bugfix for stack corruption on 64-bit architectures
authorBart Westgeest <bart@elbrys.com>
Mon, 11 Jun 2012 16:13:08 +0000 (12:13 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jun 2012 00:03:50 +0000 (17:03 -0700)
Previously a 6 byte array (buf) was erroneously cast to a 8 byte long
(event_bits) on 64-bit architectures which caused a stack corruption.

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/usbip/vhci_hcd.c

index f708cbaee16bcdf797e99160eb285225457ce4be..117a7ad9fdb184e58fd784df6cc19a37e5558a97 100644 (file)
@@ -205,7 +205,7 @@ static int vhci_hub_status(struct usb_hcd *hcd, char *buf)
        int             retval = 0;
 
        /* the enough buffer is allocated according to USB_MAXCHILDREN */
-       unsigned long   *event_bits = (unsigned long *) buf;
+       u32             *event_bits = (unsigned long *) buf;
        int             rhport;
        int             changed = 0;