Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume

From: Chunfeng Yun
Date: Tue May 11 2021 - 22:03:14 EST


On Tue, 2021-05-11 at 13:27 +0200, Greg Kroah-Hartman wrote:
> On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> > This may happen if the port becomes resume status exactly
> > when usb_port_resume() gets port status, it still need provide
> > a TRSMCRY time before access the device.
> >
> > Reported-by: Tianping Fang <tianping.fang@xxxxxxxxxxxx>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@xxxxxxxxxxxx>
> > ---
> > drivers/usb/core/hub.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Does this need to go to any older/stable kernels? If so, how far back?

The flow is changed by
"b01b03f3ad82 USB: add new routine for checking port-resume type", but
it will cause conflict with
"ad493e5e5805 usb: add usb port auto power off mechanism"

>
> thanks,
>
> greg k-h