From: Johan Hovold <johan@kernel.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/7] USB: cdc-acm: always claim data interface
Date: Mon, 22 Mar 2021 15:13:42 +0100 [thread overview]
Message-ID: <YFimFgUnc2VVQbNx@hovoldconsulting.com> (raw)
In-Reply-To: <9a802d1120a03e34d0e40e1d4e1e558c5359e92b.camel@suse.com>
On Mon, Mar 22, 2021 at 11:46:47AM +0100, Oliver Neukum wrote:
> Am Donnerstag, den 18.03.2021, 16:52 +0100 schrieb Johan Hovold:
> > Make sure to always claim the data interface and bail out if it's
> > already bound to another driver or isn't authorised.
>
> Hi,
>
> Thanks for the fixes. All previous ones are good work.
> this one is problematic I am afraid.
>
>
> acm_probe() has a test for the availability of the interface:
>
> if (!combined_interfaces && usb_interface_claimed(data_interface)) {
> /* valid in this context */
> dev_dbg(&intf->dev, "The data interface isn't available\n");
> return -EBUSY;
> }
>
> That check is ancient. BKL still existed. If you want to remove it
> and do proper error handling, that would be good. But if you do
> error handling, the check has to go, too.
Thanks, this bit can go indeed. But note that it's simply because it's
now redundant.
I'll send a v2.
Johan
prev parent reply other threads:[~2021-03-22 14:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 15:51 [PATCH 0/7] USB: cdc-acm: probe fixes Johan Hovold
2021-03-18 15:51 ` [PATCH 1/7] USB: cdc-acm: fix double free on probe failure Johan Hovold
2021-03-22 9:38 ` Oliver Neukum
2021-03-18 15:51 ` [PATCH 2/7] USB: cdc-acm: fix use-after-free after " Johan Hovold
2021-03-22 9:39 ` Oliver Neukum
2021-03-18 15:51 ` [PATCH 3/7] USB: cdc-acm: drop redundant driver-data assignment Johan Hovold
2021-03-22 9:39 ` Oliver Neukum
2021-03-18 15:51 ` [PATCH 4/7] USB: cdc-acm: drop redundant driver-data reset Johan Hovold
2021-03-22 9:40 ` Oliver Neukum
2021-03-18 15:52 ` [PATCH 5/7] USB: cdc-acm: clean up probe error labels Johan Hovold
2021-03-22 9:41 ` Oliver Neukum
2021-03-18 15:52 ` [PATCH 6/7] USB: cdc-acm: use negation for NULL checks Johan Hovold
2021-03-22 9:41 ` Oliver Neukum
2021-03-18 15:52 ` [PATCH 7/7] USB: cdc-acm: always claim data interface Johan Hovold
2021-03-22 10:46 ` Oliver Neukum
2021-03-22 14:13 ` 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=YFimFgUnc2VVQbNx@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.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;
as well as URLs for NNTP newsgroup(s).