lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220215081324.gkrut2pa3l324rnu@pengutronix.de>
Date:   Tue, 15 Feb 2022 09:13:24 +0100
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Vincent Mailhol <mailhol.vincent@...adoo.fr>
Cc:     netdev@...r.kernel.org, linux-can@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Maximilian Schneider <max@...neidersoft.net>
Subject: Re: [RFC PATCH v1] can: gs_usb: change active_channels's type from
 atomic_t to u8

On 15.02.2022 08:48:14, Vincent Mailhol wrote:
> 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: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN
> devices")
> Signed-off-by: Vincent Mailhol <mailhol.vincent@...adoo.fr>

Looks good to me, added to linux-can/testing.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ