linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Thiébaud Weksteen" <tweek@google.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: setup authorized_default using usb_bus_notify
Date: Tue, 6 Aug 2019 13:37:01 +0200	[thread overview]
Message-ID: <20190806113701.GA18582@kroah.com> (raw)
In-Reply-To: <20190806110050.38918-1-tweek@google.com>

On Tue, Aug 06, 2019 at 01:00:50PM +0200, Thiébaud Weksteen wrote:
> Currently, the authorized_default and interface_authorized_default
> attributes for HCD are set up after the uevent has been sent to userland.
> This creates a race condition where userland may fail to access this
> file when processing the event. Move the appending of these attributes
> earlier relying on the usb_bus_notify dispatcher.
> 
> Signed-off-by: Thiébaud Weksteen <tweek@google.com>
> ---
>  drivers/usb/core/hcd.c   | 123 ---------------------------------------
>  drivers/usb/core/sysfs.c | 121 ++++++++++++++++++++++++++++++++++++++
>  drivers/usb/core/usb.h   |   5 ++
>  3 files changed, 126 insertions(+), 123 deletions(-)

And does this solve the issue you reported yesterday?  If so, I'll be
glad to backport this to the older stable kernels as well.

thanks,

greg k-h

  reply	other threads:[~2019-08-06 11:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06 11:00 [PATCH] usb: setup authorized_default using usb_bus_notify Thiébaud Weksteen
2019-08-06 11:37 ` Greg Kroah-Hartman [this message]
2019-08-07 10:02   ` Thiébaud Weksteen

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=20190806113701.GA18582@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tweek@google.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).