All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troels Liebe Bentsen <troels@connectedcars.dk>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>, linux-usb@vger.kernel.org
Subject: Re: All USB tools hang when one descriptor read fails and needs to timeout
Date: Tue, 7 Feb 2023 09:25:55 +0100	[thread overview]
Message-ID: <CAHHqYPOkj3oJseEwD3=66zck1LGJGo3DD77cG0E8_GNp3EEDUw@mail.gmail.com> (raw)
In-Reply-To: <Y9mAYH7L/CcTTSw6@kroah.com>

Hi again,

Did a bit more testing and found another lock that would be nice to remove,
the /dev/bus/usb/$BUS/$DEV file for the hub is also locked:

Bus 003 Device 016: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub

strace lsusb -v
...
openat(AT_FDCWD, "/dev/bus/usb/003/016", O_RDWR|O_CLOEXEC...

The openat can not be canceled from userspace and even kill -9 won't stop
the process until the descriptor read times out.

Regards Troels

On Tue, 31 Jan 2023 at 21:56, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Tue, Jan 31, 2023 at 03:41:08PM -0500, Alan Stern wrote:
> > On Tue, Jan 31, 2023 at 04:59:36PM +0100, Troels Liebe Bentsen wrote:
> > > On Fri, 27 Jan 2023 at 17:07, Alan Stern <stern@rowland.harvard.edu> wrote:
> > > > Now that I know the config descriptors won't get reallocated after all,
> > > > I can remove the locking from the descriptors file entirely.  A patch to
> > > > do this is below.  It ought to fix your problem.  Try it and see.
> > >
> > > Thank you very much, I built a new kernel with the patch and can confirm
> > > that it fixes my issue.
> > >
> > > Will the patch make it into any of the LTS kernels as it could seem like a
> > > bugfix depending on how you look at it or is it only destined mainline, fx. 6.2
> > > or 6.3?
> >
> > I don't know.  I will submit it for the -stable kernels, but the
> > decision on whether to accept it will be up to Greg KH.
>
> I'll backport it, as it can help out with systems as Troels said.  But
> will wait until 6.3-rc1 is out as this should get some testing.
>
> thanks,
>
> greg k-h

  reply	other threads:[~2023-02-07  8:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26 11:49 All USB tools hang when one descriptor read fails and needs to timeout Troels Liebe Bentsen
2023-01-26 12:23 ` Greg KH
2023-01-26 13:06   ` Troels Liebe Bentsen
2023-01-26 13:12     ` Greg KH
2023-01-26 13:59       ` Troels Liebe Bentsen
2023-01-26 14:27         ` Hans Petter Selasky
2023-01-26 15:26           ` Troels Liebe Bentsen
2023-01-26 16:23             ` Alan Stern
2023-01-26 16:17         ` Alan Stern
2023-01-27 14:12           ` Troels Liebe Bentsen
2023-01-27 16:07             ` Alan Stern
2023-01-31 15:59               ` Troels Liebe Bentsen
2023-01-31 20:41                 ` Alan Stern
2023-01-31 20:56                   ` Greg KH
2023-02-07  8:25                     ` Troels Liebe Bentsen [this message]
2023-02-07  8:33                       ` Troels Liebe Bentsen
2023-02-07 17:52                       ` Alan Stern
2023-02-08 16:48                         ` Alan Stern
2023-02-08 20:46                           ` Troels Liebe Bentsen
2023-02-08 21:57                             ` Alan Stern

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='CAHHqYPOkj3oJseEwD3=66zck1LGJGo3DD77cG0E8_GNp3EEDUw@mail.gmail.com' \
    --to=troels@connectedcars.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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.