Re: [PATCH] fix: drivers/usb/serial: usb_console_setup: unmatched usb_serial_put on error paths

From: Johan Hovold

Date: Mon Jul 06 2026 - 09:41:56 EST


On Sat, Jun 27, 2026 at 11:34:10AM +0800, WenTao Liang wrote:
> In usb_console_setup(), serial is obtained via a simple pointer
> assignment (port->serial) which does not increment the reference count.
> However, all error paths that reach error_get_interface call
> usb_serial_put(serial), decrementing a reference that was never acquired
> within the function. This causes a refcount underflow on the serial
> device.
>
> Remove the unmatched usb_serial_put(serial) call from the error path.

No, there's a reference taken in usb_serial_port_get_by_minor() so this
patch would introduce an imbalance.

How are you coming up with these patches? Are you using an LLM? Why is
that not documented as required?

And why haven't you sent the follow-up mail telling maintainers to
ignore your patches as Greg asked you to do? [1]

Also I sent you review comments on other USB patches a month ago which
you still haven't replied to.

If you keep this up, you and your "lab" (why are you all using the same
mail address?) might end up banned as you've already been warned.

> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 61dfa797c731 ("USB: serial: console: move mutex_unlock() before usb_serial_put()")

What on earth does this commit have to do with anything?

> Signed-off-by: WenTao Liang <vulab@xxxxxxxxxxx>

Johan


[1] https://lore.kernel.org/all/2026062704-detail-machine-270f@gregkh/