From: Andrew Lunn <andrew@lunn.ch>
To: Michal Pecio <michal.pecio@gmail.com>
Cc: Petko Manolov <petkan@nucleusys.com>,
Simon Horman <horms@kernel.org>,
Morduan Zang <zhangdandan@uniontech.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+9db6c624635564ad813c@syzkaller.appspotmail.com
Subject: Re: [PATCH] usb: rtl8150: avoid using uninitialized CSCR value
Date: Wed, 8 Apr 2026 14:26:42 +0200 [thread overview]
Message-ID: <f32a716f-2193-412c-b571-9001d5c7301d@lunn.ch> (raw)
In-Reply-To: <20260408103343.19cf599a.michal.pecio@gmail.com>
> BTW, some functions like rtl8150_reset() pre-set data to a value which
> will be safe in case of get_register() failure. But here, unhandled
> set_register() error is dodgy - the 0x10 bit may never turn on.
rtl8150_reset() is not great, it would be better to use something from
iopoll.h, and return ETIMEDOUT, but it does at least have a
timeout. And it looks like all other such loops have some form of
timeout.
Could this driver use some love? Yes. Does it mean not checking for
get_register() failure makes the driver badly broken? Probably not.
Andrew
next prev parent reply other threads:[~2026-04-08 12:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 7:07 [PATCH] usb: rtl8150: avoid using uninitialized CSCR value Morduan Zang
2026-04-02 15:51 ` Petko Manolov
2026-04-03 15:45 ` Simon Horman
2026-04-05 8:52 ` Petko Manolov
2026-04-05 23:38 ` Andrew Lunn
2026-04-08 8:33 ` Michal Pecio
2026-04-08 12:26 ` Andrew Lunn [this message]
2026-04-08 8:18 ` Morduan Zang
2026-04-21 10:51 ` [PATCH v2] " Morduan Zang
2026-04-23 18:42 ` Jakub Kicinski
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=f32a716f-2193-412c-b571-9001d5c7301d@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=michal.pecio@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petkan@nucleusys.com \
--cc=syzbot+9db6c624635564ad813c@syzkaller.appspotmail.com \
--cc=zhangdandan@uniontech.com \
/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