Re: [PATCH v2] USB: cdc-acm: fix minor-number release

From: Oliver Neukum
Date: Tue Sep 07 2021 - 04:53:43 EST



On 07.09.21 10:23, Johan Hovold wrote:
> If the driver runs out of minor numbers it would release minor 0 and
> allow another device to claim the minor while still in use.
>
> Fortunately, registering the tty class device of the second device would
> fail (with a stack dump) due to the sysfs name collision so no memory is
> leaked.
>
> Fixes: cae2bc768d17 ("usb: cdc-acm: Decrement tty port's refcount if probe() fail")
> Cc: stable@xxxxxxxxxxxxxxx # 4.19
> Cc: Jaejoong Kim <climbbb.kim@xxxxxxxxx>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
Acked-by: Oliver Neukum <oneukum@xxxxxxxx>