From: Johan Hovold <johan@kernel.org>
To: WenTao Liang <vulab@iscas.ac.cn>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] fix: drivers/usb/serial: usb_console_setup: unmatched usb_serial_put on error paths
Date: Mon, 6 Jul 2026 13:55:04 +0200 [thread overview]
Message-ID: <akuXmD-7nzKVgBT0@hovoldconsulting.com> (raw)
In-Reply-To: <20260627033410.58709-1-vulab@iscas.ac.cn>
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@vger.kernel.org
> 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@iscas.ac.cn>
Johan
[1] https://lore.kernel.org/all/2026062704-detail-machine-270f@gregkh/
prev parent reply other threads:[~2026-07-06 11:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-27 3:34 [PATCH] fix: drivers/usb/serial: usb_console_setup: unmatched usb_serial_put on error paths WenTao Liang
2026-07-06 11:55 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=akuXmD-7nzKVgBT0@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox