[ 3.5.y.z extended stable ] Patch "zd1201: do not use stack as URB transfer_buffer" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Thu Aug 29 09:32:24 UTC 2013
This is a note to let you know that I have just added a patch titled
zd1201: do not use stack as URB transfer_buffer
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From a769b35716975db4f6b33988b011f1a24bd2aa5f Mon Sep 17 00:00:00 2001
From: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date: Tue, 6 Aug 2013 14:28:42 +0300
Subject: [PATCH] zd1201: do not use stack as URB transfer_buffer
commit 1206ff4ff9d2ef7468a355328bc58ac6ebf5be44 upstream.
Patch fixes zd1201 not to use stack as URB transfer_buffer. URB buffers need
to be DMA-able, which stack is not.
Patch is only compile tested.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Signed-off-by: John W. Linville <linville at tuxdriver.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/net/wireless/zd1201.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 48273dd..4312eca 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -98,10 +98,12 @@ static int zd1201_fw_upload(struct usb_device *dev, int apfw)
goto exit;
err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4,
- USB_DIR_IN | 0x40, 0,0, &ret, sizeof(ret), ZD1201_FW_TIMEOUT);
+ USB_DIR_IN | 0x40, 0, 0, buf, sizeof(ret), ZD1201_FW_TIMEOUT);
if (err < 0)
goto exit;
+ memcpy(&ret, buf, sizeof(ret));
+
if (ret & 0x80) {
err = -EIO;
goto exit;
--
1.8.3.2
More information about the kernel-team
mailing list