mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-24 19:10:20 +00:00
The driver uses an atomic_t variable: gs_usb:active_channels to keep
track of the number of opened channels in order to only allocate
memory for the URBs when this count changes from zero to one.
However, the driver does not decrement the counter when an error
occurs in gs_can_open(). This issue is fixed by changing the type from
atomic_t to u8 and by simplifying the logic accordingly.
It is safe to use an u8 here because the network stack big kernel lock
(a.k.a. rtnl_mutex) is being hold. For details, please refer to [1].
[1] https://lore.kernel.org/linux-can/CAMZ6Rq+sHpiw34ijPsmp7vbUpDtJwvVtdV7CvRZJsLixjAFfrg@mail.gmail.com/T/#t
Fixes:
|
||
|---|---|---|
| .. | ||
| etas_es58x | ||
| kvaser_usb | ||
| peak_usb | ||
| ems_usb.c | ||
| esd_usb2.c | ||
| gs_usb.c | ||
| Kconfig | ||
| Makefile | ||
| mcba_usb.c | ||
| ucan.c | ||
| usb_8dev.c | ||