lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201013152426.GB670875@rowland.harvard.edu>
Date:   Tue, 13 Oct 2020 11:24:26 -0400
From:   Alan Stern <stern@...land.harvard.edu>
To:     Pratham Pratap <prathampratap@...eaurora.org>
Cc:     gregkh@...uxfoundation.org, rafael.j.wysocki@...el.com,
        mathias.nyman@...ux.intel.com, andriy.shevchenko@...ux.intel.com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        sallenki@...eaurora.org, mgautam@...eaurora.org,
        jackp@...eaurora.org, stable@...r.kernel.org
Subject: Re: [PATCH] usb: core: Don't wait for completion of urbs

On Tue, Oct 13, 2020 at 04:17:02PM +0530, Pratham Pratap wrote:
> Consider a case where host is trying to submit urbs to the
> connected device while holding the us->dev_mutex and due to
> some reason it is stuck while waiting for the completion of
> the urbs. Now the scsi error mechanism kicks in and it calls

Are you talking about usb-storage?  You should describe the context 
better -- judging by the patch title, it looks like you're talking 
about a core driver instead.

> the device reset handler which is trying to acquire the same
> mutex causing a deadlock situation.

That isn't supposed to happen.  The SCSI error handler should always 
cancel all the outstanding commands before invoking the device reset 
handler.  Cancelling the commands will cause the URBs to complete.

If you found a test case where this doesn't happen, it probably means 
there's a bug in the SCSI core code or the USB host controller driver.  
That bug should be fixed; don't introduce random timeout values to try 
and work around it.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ