Re: [PATCH] usb-storage: block runtime suspend when the host is added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 21 Sep 2016, Greg KH wrote:

> On Wed, Sep 21, 2016 at 11:25:37AM -0400, Alan Stern wrote:
> > A warning message that was recently added to the PM core has alerted
> > us to a potential problem in usb-storage.  Although the USB interface
> > is in the runtime active state when the probe routine starts, until
> > the runtime-PM usage count is incremented nothing forces it to remain
> > active.  The increment doesn't happen until after scsi_add_host() is
> > called, and that call causes the interface to go into runtime suspend.
> > 
> > Although this hasn't caused anything to go wrong for anyone, as far as
> > I know, it still is a bug.
> > 
> > To prevent this from happening, move the existing call to
> > usb_autopm_get_interface_no_resume() up from its current position to
> > before scsi_add_host() is called.
> > 
> > Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> > Reported-by: Carsten Mattner <carstenmattner@xxxxxxxxx>
> > Tested-by: Carsten Mattner <carstenmattner@xxxxxxxxx>
> > CC: <stable@xxxxxxxxxxxxxxx>
> 
> It's a bit late for 4.8 for this, can we wait for 4.9-rc1?
> 
> This doesn't apply to my usb-next branch, so things have changed in this
> area, did they solve the issue already?

Heh -- I _thought_ this issue seemed familiar.  :-)

Yes, it has already been fixed by commit a094760b9a77 ("usb: storage: 
fix runtime pm issue in usb_stor_probe2") by Heiner Kallweit.  I even 
Acked his patch, but I didn't remember it.

So Carsten, there's your answer.  The commit will be part of 4.9-rc1, 
unless Greg shoehorns it into 4.8.

But if it doesn't get into 4.8 then it should be marked for
4.8.stable, to prevent those new warning messages from alarming people.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux