Linux v3.11-rc3-376-g72a67a9

This commit is contained in:
Josh Boyer 2013-08-03 21:15:25 -04:00
parent 5f6bb1ff66
commit 56d4a4ed57
3 changed files with 5 additions and 80 deletions

View File

@ -1,72 +0,0 @@
Memory allocated by vmalloc (including stack) can not be used for DMA,
i.e. data pointer on usb_control_msg() should not point to stack memory.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=977558
Reported-and-tested-by: Andy Lawrence <dr.diesel@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/bluetooth/ath3k.c | 38 +++++++++++++++++++++++++++++---------
1 file changed, 29 insertions(+), 9 deletions(-)
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 11f467c..81b636c 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -193,24 +193,44 @@ error:
static int ath3k_get_state(struct usb_device *udev, unsigned char *state)
{
- int pipe = 0;
+ int ret, pipe = 0;
+ char *buf;
+
+ buf = kmalloc(1, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
pipe = usb_rcvctrlpipe(udev, 0);
- return usb_control_msg(udev, pipe, ATH3K_GETSTATE,
- USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
- state, 0x01, USB_CTRL_SET_TIMEOUT);
+ ret = usb_control_msg(udev, pipe, ATH3K_GETSTATE,
+ USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
+ buf, 1, USB_CTRL_SET_TIMEOUT);
+
+ *state = *buf;
+ kfree(buf);
+
+ return ret;
}
static int ath3k_get_version(struct usb_device *udev,
struct ath3k_version *version)
{
- int pipe = 0;
+ int ret, pipe = 0;
+ char *buf;
+ const int size = sizeof(struct ath3k_version);
+
+ buf = kmalloc(size, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
pipe = usb_rcvctrlpipe(udev, 0);
- return usb_control_msg(udev, pipe, ATH3K_GETVERSION,
- USB_TYPE_VENDOR | USB_DIR_IN, 0, 0, version,
- sizeof(struct ath3k_version),
- USB_CTRL_SET_TIMEOUT);
+ ret = usb_control_msg(udev, pipe, ATH3K_GETVERSION,
+ USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
+ buf, size, USB_CTRL_SET_TIMEOUT);
+
+ memcpy(version, buf, size);
+ kfree(buf);
+
+ return ret;
}
static int ath3k_load_fwfile(struct usb_device *udev,
--
1.7.11.7

View File

@ -95,7 +95,7 @@ Summary: The Linux kernel
# The rc snapshot level # The rc snapshot level
%define rcrev 3 %define rcrev 3
# The git snapshot level # The git snapshot level
%define gitrev 3 %define gitrev 4
# Set rpm version accordingly # Set rpm version accordingly
%define rpmversion 3.%{upstream_sublevel}.0 %define rpmversion 3.%{upstream_sublevel}.0
%endif %endif
@ -735,9 +735,6 @@ Patch25032: cve-2013-2147-ciss-info-leak.patch
Patch25047: drm-radeon-Disable-writeback-by-default-on-ppc.patch Patch25047: drm-radeon-Disable-writeback-by-default-on-ppc.patch
#rhbz 977558
Patch25055: ath3k-dont-use-stack-memory-for-DMA.patch
#rhbz 977040 #rhbz 977040
Patch25056: iwl3945-better-skb-management-in-rx-path.patch Patch25056: iwl3945-better-skb-management-in-rx-path.patch
Patch25057: iwl4965-better-skb-management-in-rx-path.patch Patch25057: iwl4965-better-skb-management-in-rx-path.patch
@ -1442,9 +1439,6 @@ ApplyPatch cve-2013-2147-ciss-info-leak.patch
ApplyPatch drm-radeon-Disable-writeback-by-default-on-ppc.patch ApplyPatch drm-radeon-Disable-writeback-by-default-on-ppc.patch
#rhbz 977558
ApplyPatch ath3k-dont-use-stack-memory-for-DMA.patch
#rhbz 977040 #rhbz 977040
ApplyPatch iwl3945-better-skb-management-in-rx-path.patch ApplyPatch iwl3945-better-skb-management-in-rx-path.patch
ApplyPatch iwl4965-better-skb-management-in-rx-path.patch ApplyPatch iwl4965-better-skb-management-in-rx-path.patch
@ -2256,6 +2250,9 @@ fi
# ||----w | # ||----w |
# || || # || ||
%changelog %changelog
* Sun Aug 04 2013 Josh Boyer <jwboyer@redhat.com> - 3.11.0-0.rc3.git4.1
- Linux v3.11-rc3-376-g72a67a9
* Sat Aug 03 2013 Josh Boyer <jwboyer@redhat.com> - 3.11.0-0.rc3.git3.1 * Sat Aug 03 2013 Josh Boyer <jwboyer@redhat.com> - 3.11.0-0.rc3.git3.1
- Linux v3.11-rc3-288-gabe0308 - Linux v3.11-rc3-288-gabe0308

View File

@ -1,3 +1,3 @@
4f25cd5bec5f8d5a7d935b3f2ccb8481 linux-3.10.tar.xz 4f25cd5bec5f8d5a7d935b3f2ccb8481 linux-3.10.tar.xz
8cbb2de41da38d739f0e70d9d40cad5c patch-3.11-rc3.xz 8cbb2de41da38d739f0e70d9d40cad5c patch-3.11-rc3.xz
b0abf628dda91fa8301e9188cd6c452f patch-3.11-rc3-git3.xz 897fb1a3cc88989f6c2b1e968f6f4818 patch-3.11-rc3-git4.xz