All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Johan Hovold <johan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: 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 11:46:47 +0100	[thread overview]
Message-ID: <9a802d1120a03e34d0e40e1d4e1e558c5359e92b.camel@suse.com> (raw)
In-Reply-To: <20210318155202.22230-8-johan@kernel.org>

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.

	Regards
		Oliver



  reply	other threads:[~2021-03-22 10:47 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 [this message]
2021-03-22 14:13     ` Johan Hovold

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=9a802d1120a03e34d0e40e1d4e1e558c5359e92b.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.