|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1 |
|
| #
8fa7292f |
| 05-Apr-2025 |
Thomas Gleixner <[email protected]> |
treewide: Switch/rename to timer_delete[_sync]()
timer_delete[_sync]() replaces del_timer[_sync](). Convert the whole tree over and remove the historical wrapper inlines.
Conversion was done with c
treewide: Switch/rename to timer_delete[_sync]()
timer_delete[_sync]() replaces del_timer[_sync](). Convert the whole tree over and remove the historical wrapper inlines.
Conversion was done with coccinelle plus manual fixups where necessary.
Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
show more ...
|
|
Revision tags: v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12 |
|
| #
9a0c58d0 |
| 12-Nov-2024 |
Sabyrzhan Tasbolatov <[email protected]> |
drivers/usb/misc: refactor min with min_t
Ensure type safety by using min_t() instead of min().
Also add the explicit `unsigned int` as scripts/checkpatch.pl warns about:
WARNING: Prefer 'unsigne
drivers/usb/misc: refactor min with min_t
Ensure type safety by using min_t() instead of min().
Also add the explicit `unsigned int` as scripts/checkpatch.pl warns about:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Sabyrzhan Tasbolatov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5 |
|
| #
0f5aa1b0 |
| 05-Oct-2023 |
Dan Carpenter <[email protected]> |
usb: usbtest: fix a type promotion bug
The "len" here is sometimes negative error codes from usb_get_descriptor(), so we don't want to type promote them to unsigned long.
This bug pre-dates the inv
usb: usbtest: fix a type promotion bug
The "len" here is sometimes negative error codes from usb_get_descriptor(), so we don't want to type promote them to unsigned long.
This bug pre-dates the invention of git.
Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7 |
|
| #
676cb83b |
| 16-Jul-2022 |
Jilin Yuan <[email protected]> |
usb/misc: fix repeated words in comments
Delete the redundant word 'with'.
Signed-off-by: Jilin Yuan <[email protected]> Link: https://lore.kernel.org/r/20220716134105.44710-1-yuanjilin@cdjrlc.
usb/misc: fix repeated words in comments
Delete the redundant word 'with'.
Signed-off-by: Jilin Yuan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6, v5.9-rc5, v5.9-rc4, v5.9-rc3, v5.9-rc2, v5.9-rc1, v5.8, v5.8-rc7, v5.8-rc6 |
|
| #
a482766d |
| 17-Jul-2020 |
Bixuan Cui <[email protected]> |
usb: usbtest: reduce stack usage in test_queue
Fix the warning: [-Werror=-Wframe-larger-than=]
drivers/usb/misc/usbtest.c: In function 'test_queue': drivers/usb/misc/usbtest.c:2148:1: warning: the
usb: usbtest: reduce stack usage in test_queue
Fix the warning: [-Werror=-Wframe-larger-than=]
drivers/usb/misc/usbtest.c: In function 'test_queue': drivers/usb/misc/usbtest.c:2148:1: warning: the frame size of 1232 bytes is larger than 1024 bytes
Reported-by: kbuild test robot <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Bixuan Cui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.8-rc5 |
|
| #
0d9b6d49 |
| 07-Jul-2020 |
Gustavo A. R. Silva <[email protected]> |
usb: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings
usb: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva <[email protected]> Link: https://lore.kernel.org/r/20200707195607.GA4198@embeddedor Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1 |
|
| #
28ebeb8d |
| 12-Jun-2020 |
Zqiang <[email protected]> |
usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnect
BUG: memory leak unreferenced object 0xffff888055046e00 (size 256): comm "kworker/2:9", pid 2570, jiffies 4294942129 (age 1095.500s)
usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnect
BUG: memory leak unreferenced object 0xffff888055046e00 (size 256): comm "kworker/2:9", pid 2570, jiffies 4294942129 (age 1095.500s) hex dump (first 32 bytes): 00 70 04 55 80 88 ff ff 18 bb 5a 81 ff ff ff ff .p.U......Z..... f5 96 78 81 ff ff ff ff 37 de 8e 81 ff ff ff ff ..x.....7....... backtrace: [<00000000d121dccf>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<00000000d121dccf>] slab_post_alloc_hook mm/slab.h:586 [inline] [<00000000d121dccf>] slab_alloc_node mm/slub.c:2786 [inline] [<00000000d121dccf>] slab_alloc mm/slub.c:2794 [inline] [<00000000d121dccf>] kmem_cache_alloc_trace+0x15e/0x2d0 mm/slub.c:2811 [<000000005c3c3381>] kmalloc include/linux/slab.h:555 [inline] [<000000005c3c3381>] usbtest_probe+0x286/0x19d0 drivers/usb/misc/usbtest.c:2790 [<000000001cec6910>] usb_probe_interface+0x2bd/0x870 drivers/usb/core/driver.c:361 [<000000007806c118>] really_probe+0x48d/0x8f0 drivers/base/dd.c:551 [<00000000a3308c3e>] driver_probe_device+0xfc/0x2a0 drivers/base/dd.c:724 [<000000003ef66004>] __device_attach_driver+0x1b6/0x240 drivers/base/dd.c:831 [<00000000eee53e97>] bus_for_each_drv+0x14e/0x1e0 drivers/base/bus.c:431 [<00000000bb0648d0>] __device_attach+0x1f9/0x350 drivers/base/dd.c:897 [<00000000838b324a>] device_initial_probe+0x1a/0x20 drivers/base/dd.c:944 [<0000000030d501c1>] bus_probe_device+0x1e1/0x280 drivers/base/bus.c:491 [<000000005bd7adef>] device_add+0x131d/0x1c40 drivers/base/core.c:2504 [<00000000a0937814>] usb_set_configuration+0xe84/0x1ab0 drivers/usb/core/message.c:2030 [<00000000e3934741>] generic_probe+0x6a/0xe0 drivers/usb/core/generic.c:210 [<0000000098ade0f1>] usb_probe_device+0x90/0xd0 drivers/usb/core/driver.c:266 [<000000007806c118>] really_probe+0x48d/0x8f0 drivers/base/dd.c:551 [<00000000a3308c3e>] driver_probe_device+0xfc/0x2a0 drivers/base/dd.c:724
Acked-by: Alan Stern <[email protected]> Reported-by: Kyungtae Kim <[email protected]> Signed-off-by: Zqiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.7, v5.7-rc7, v5.7-rc6, v5.7-rc5, v5.7-rc4, v5.7-rc3, v5.7-rc2, v5.7-rc1, v5.6, v5.6-rc7, v5.6-rc6, v5.6-rc5, v5.6-rc4, v5.6-rc3, v5.6-rc2, v5.6-rc1, v5.5, v5.5-rc7, v5.5-rc6, v5.5-rc5, v5.5-rc4, v5.5-rc3, v5.5-rc2, v5.5-rc1, v5.4, v5.4-rc8, v5.4-rc7, v5.4-rc6, v5.4-rc5, v5.4-rc4, v5.4-rc3, v5.4-rc2, v5.4-rc1, v5.3, v5.3-rc8, v5.3-rc7, v5.3-rc6, v5.3-rc5, v5.3-rc4, v5.3-rc3, v5.3-rc2, v5.3-rc1, v5.2, v5.2-rc7, v5.2-rc6, v5.2-rc5, v5.2-rc4, v5.2-rc3, v5.2-rc2, v5.2-rc1, v5.1, v5.1-rc7, v5.1-rc6, v5.1-rc5, v5.1-rc4, v5.1-rc3, v5.1-rc2, v5.1-rc1, v5.0, v5.0-rc8, v5.0-rc7 |
|
| #
0d1ec194 |
| 12-Feb-2019 |
Peter Chen <[email protected]> |
usb: misc: usbtest: add super-speed isoc support
The calculation of packet number within microframe is different between high-speed and super-speed endpoint, we add support for super-speed in this p
usb: misc: usbtest: add super-speed isoc support
The calculation of packet number within microframe is different between high-speed and super-speed endpoint, we add support for super-speed in this patch.
Cc: Pawel Laszczak <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
show more ...
|
|
Revision tags: v5.0-rc6, v5.0-rc5, v5.0-rc4, v5.0-rc3, v5.0-rc2, v5.0-rc1, v4.20, v4.20-rc7, v4.20-rc6, v4.20-rc5, v4.20-rc4, v4.20-rc3, v4.20-rc2, v4.20-rc1, v4.19, v4.19-rc8, v4.19-rc7, v4.19-rc6, v4.19-rc5, v4.19-rc4, v4.19-rc3, v4.19-rc2, v4.19-rc1, v4.18, v4.18-rc8, v4.18-rc7, v4.18-rc6, v4.18-rc5, v4.18-rc4, v4.18-rc3 |
|
| #
ee9a4ae7 |
| 01-Jul-2018 |
Sebastian Andrzej Siewior <[email protected]> |
usb: usbtest: use irqsave() in USB's complete callback
The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __u
usb: usbtest: use irqsave() in USB's complete callback
The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __usb_hcd_giveback_urb() and therefore it is required for the callback handler to disable the interrupts while acquiring the lock. The callback may be invoked either in IRQ or BH context depending on the USB host controller. Use the _irqsave() variant of the locking primitives.
Cc: Greg Kroah-Hartman <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
show more ...
|
| #
6f3fde68 |
| 01-Jul-2018 |
Sebastian Andrzej Siewior <[email protected]> |
usb: usbtest: use irqsave() in USB's complete callback
The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __u
usb: usbtest: use irqsave() in USB's complete callback
The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __usb_hcd_giveback_urb() and therefore it is required for the callback handler to disable the interrupts while acquiring the lock. The callback may be invoked either in IRQ or BH context depending on the USB host controller. Use the _irqsave() variant of the locking primitives.
Cc: Greg Kroah-Hartman <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v4.18-rc2, v4.18-rc1, v4.17, v4.17-rc7, v4.17-rc6, v4.17-rc5, v4.17-rc4, v4.17-rc3, v4.17-rc2, v4.17-rc1, v4.16, v4.16-rc7, v4.16-rc6, v4.16-rc5 |
|
| #
c53439fb |
| 09-Mar-2018 |
Tobin C. Harding <[email protected]> |
usb: usbtest: Remove stack VLA usage
The kernel would like to have all stack VLA usage removed[1]. We already have a pre-processor constant defined MAX_SGLEN. We can use this instead of the variab
usb: usbtest: Remove stack VLA usage
The kernel would like to have all stack VLA usage removed[1]. We already have a pre-processor constant defined MAX_SGLEN. We can use this instead of the variable param-sglen.
[1]: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Tobin C. Harding <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v4.16-rc4, v4.16-rc3, v4.16-rc2, v4.16-rc1, v4.15, v4.15-rc9, v4.15-rc8, v4.15-rc7, v4.15-rc6, v4.15-rc5, v4.15-rc4 |
|
| #
cc2e60df |
| 15-Dec-2017 |
Mathias Nyman <[email protected]> |
usb: usbtest: Add TEST 29, toggle sync, Clear toggle between bulk writes
Clear Feature Endpoint Halt should reset the data toggle even if the endpoint isn't halted. Host should manage to clear the h
usb: usbtest: Add TEST 29, toggle sync, Clear toggle between bulk writes
Clear Feature Endpoint Halt should reset the data toggle even if the endpoint isn't halted. Host should manage to clear the host side data toggle to keep in sync with the device.
Test by sending a "3 data packet URB" before and after clearing the halt. this should create a toggle sequence with two consecutive DATA0 packets.
A successful test sequence looks like this ClearFeature(ENDPOINT_HALT) - initial toggle clear DATA0 (max packet sized) DATA1 (max packet sized) DATA0 (zero length packet) ClearFeature(ENDPOINT_HALT) - resets toggle DATA0 (max packet sized), if clear halt fails then toggle is DATA1 DATA1 (max packet sized) DATA0 (zero length packet)
Signed-off-by: Mathias Nyman <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v4.15-rc3, v4.15-rc2, v4.15-rc1, v4.14, v4.14-rc8 |
|
| #
d9e1e148 |
| 02-Nov-2017 |
Felipe Balbi <[email protected]> |
usb: core: introduce a new usb_get_std_status() helper
This new helper is a simple wrapper around usb_get_status(). This patch is in preparation to adding support for fetching PTM_STATUS types. No f
usb: core: introduce a new usb_get_std_status() helper
This new helper is a simple wrapper around usb_get_status(). This patch is in preparation to adding support for fetching PTM_STATUS types. No functional changes.
Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
5fd54ace |
| 03-Nov-2017 |
Greg Kroah-Hartman <[email protected]> |
USB: add SPDX identifiers to all remaining files in drivers/usb/
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses.
Update the drivers/
USB: add SPDX identifiers to all remaining files in drivers/usb/
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses.
Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text.
This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart.
Cc: Thomas Gleixner <[email protected]> Cc: Kate Stewart <[email protected]> Cc: Philippe Ombredanne <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Acked-by: Felipe Balbi <[email protected]> Acked-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc7, v4.14-rc6 |
|
| #
7d221856 |
| 23-Oct-2017 |
Kees Cook <[email protected]> |
usb: usbtest: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_time
usb: usbtest: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also adds missing call to destroy_timer_on_stack();
Cc: Greg Kroah-Hartman <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Alan Stern <[email protected]> Cc: "Gustavo A. R. Silva" <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
9f8e32df |
| 20-Oct-2017 |
Jaejoong Kim <[email protected]> |
usb: misc: usbtest: remove duplicate & operation
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7
usb: misc: usbtest: remove duplicate & operation
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff.
Signed-off-by: Jaejoong Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
1c236d41 |
| 20-Oct-2017 |
Jaejoong Kim <[email protected]> |
usb: misc: usbtest: remove duplicate & operation
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7
usb: misc: usbtest: remove duplicate & operation
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff.
Signed-off-by: Jaejoong Kim <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc5, v4.14-rc4, v4.14-rc3 |
|
| #
7c80f9e4 |
| 29-Sep-2017 |
Alan Stern <[email protected]> |
usb: usbtest: fix NULL pointer dereference
If the usbtest driver encounters a device with an IN bulk endpoint but no OUT bulk endpoint, it will try to dereference a NULL pointer (out->desc.bEndpoint
usb: usbtest: fix NULL pointer dereference
If the usbtest driver encounters a device with an IN bulk endpoint but no OUT bulk endpoint, it will try to dereference a NULL pointer (out->desc.bEndpointAddress). The problem can be solved by adding a missing test.
Signed-off-by: Alan Stern <[email protected]> Reported-by: Andrey Konovalov <[email protected]> Tested-by: Andrey Konovalov <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
show more ...
|
| #
cb84f568 |
| 30-Sep-2017 |
Dan Carpenter <[email protected]> |
usb: misc: usbtest: Fix overflow in usbtest_do_ioctl()
There used to be a test against "if (param->sglen > MAX_SGLEN)" but it was removed during a refactor. It leads to an integer overflow and a st
usb: misc: usbtest: Fix overflow in usbtest_do_ioctl()
There used to be a test against "if (param->sglen > MAX_SGLEN)" but it was removed during a refactor. It leads to an integer overflow and a stack overflow in test_queue() if we try to create a too large urbs[] array on the stack.
There is a second integer overflow in test_queue() as well if "param->iterations" is too high. I don't immediately see that it's harmful but I've added a check to prevent it and silence the static checker warning.
Fixes: 18fc4ebdc705 ("usb: misc: usbtest: Remove timeval usage") Acked-by: Deepa Dinamani <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc2, v4.14-rc1, v4.13, v4.13-rc7, v4.13-rc6, v4.13-rc5, v4.13-rc4, v4.13-rc3, v4.13-rc2, v4.13-rc1, v4.12, v4.12-rc7, v4.12-rc6, v4.12-rc5, v4.12-rc4, v4.12-rc3, v4.12-rc2, v4.12-rc1, v4.11, v4.11-rc8, v4.11-rc7, v4.11-rc6 |
|
| #
65c7843c |
| 04-Apr-2017 |
Gustavo A. R. Silva <[email protected]> |
usb: misc: refactor code
Code refactoring to make the flow easier to follow.
Signed-off-by: Gustavo A. R. Silva <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off
usb: misc: refactor code
Code refactoring to make the flow easier to follow.
Signed-off-by: Gustavo A. R. Silva <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
2c930e3d |
| 04-Apr-2017 |
Gustavo A. R. Silva <[email protected]> |
usb: misc: add missing continue in switch
Add missing continue in switch.
Addresses-Coverity-ID: 1248733 Signed-off-by: Gustavo A. R. Silva <[email protected]> Acked-by: Alan Stern <stern@row
usb: misc: add missing continue in switch
Add missing continue in switch.
Addresses-Coverity-ID: 1248733 Signed-off-by: Gustavo A. R. Silva <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v4.11-rc5, v4.11-rc4, v4.11-rc3, v4.11-rc2, v4.11-rc1, v4.10, v4.10-rc8 |
|
| #
ef5ec7f0 |
| 12-Feb-2017 |
Colin Ian King <[email protected]> |
usb: misc: usbtest: remove redundant check on retval < 0
The check for retval being less than zero is always true since retval equal to -EPIPE at that point. Replace the existing conditional with j
usb: misc: usbtest: remove redundant check on retval < 0
The check for retval being less than zero is always true since retval equal to -EPIPE at that point. Replace the existing conditional with just return retval.
Detected with CoverityScan, CID#114349 ("Logically dead code")
Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v4.10-rc7, v4.10-rc6, v4.10-rc5, v4.10-rc4, v4.10-rc3, v4.10-rc2, v4.10-rc1, v4.9, v4.9-rc8, v4.9-rc7, v4.9-rc6, v4.9-rc5, v4.9-rc4, v4.9-rc3, v4.9-rc2, v4.9-rc1, v4.8 |
|
| #
efdd17e6 |
| 28-Sep-2016 |
Felipe Balbi <[email protected]> |
usb: misc: usbtest: remove unnecessary & operation
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver.
Signed-off-by: F
usb: misc: usbtest: remove unnecessary & operation
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver.
Signed-off-by: Felipe Balbi <[email protected]>
show more ...
|
| #
131e19b9 |
| 28-Sep-2016 |
Felipe Balbi <[email protected]> |
usb: misc: usbtest: make use of new usb_endpoint_maxp_mult()
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it.
Signed-off-by: Felipe Balbi <felipe.balbi
usb: misc: usbtest: make use of new usb_endpoint_maxp_mult()
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it.
Signed-off-by: Felipe Balbi <[email protected]>
show more ...
|
|
Revision tags: v4.8-rc8, v4.8-rc7, v4.8-rc6, v4.8-rc5, v4.8-rc4, v4.8-rc3, v4.8-rc2 |
|
| #
53958751 |
| 11-Aug-2016 |
Lu Baolu <[email protected]> |
usb: misc: usbtest: add fix for driver hang
In sg_timeout(), req->status is set to "-ETIMEDOUT" before calling into usb_sg_cancel(). usb_sg_cancel() will do nothing and return directly if req->statu
usb: misc: usbtest: add fix for driver hang
In sg_timeout(), req->status is set to "-ETIMEDOUT" before calling into usb_sg_cancel(). usb_sg_cancel() will do nothing and return directly if req->status has been set to a non-zero value. This will cause driver hang whenever transfer time out is triggered.
This patch fixes this issue. It could be backported to stable kernel with version later than v3.15.
Cc: [email protected] # 3.15+ Cc: Alan Stern <[email protected]> Signed-off-by: Lu Baolu <[email protected]> Suggested-by: Alan Stern <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|