ohci-hcd: Fix race condition caused by ohci_urb_enqueue() and io_watchdog_func()
From: Yoshida, Shigeru <hidden>
Date: 2018-02-02 01:46:01
Also in:
lkml
From: Yoshida, Shigeru <hidden>
Date: 2018-02-02 01:46:01
Also in:
lkml
Hi Alan, On Thu, 1 Feb 2018 10:33:33 -0500, Alan Stern wrote:
quoted
I think we must choose an invalid frame number for the special sentinel value, but I'm not sure which value is adequate for it. Is 0xffffff00 an invalid frame number, otherwise how about simply -1(0xffffffff)?Well, the frame_no register is 32 bits wide, but only the 16 low-order bits are meaningful. ohci_frame_no() strips off the high-order 16 bits, so any value with one of those bits set would be acceptable. (Besides, valid frame numbers only go up to 2047.) I chose 0xffffff00 because PCI reads from a non-working device generally get a value with all the bits set. But since the upper 16 bits are masked away anyhow, it doesn't matter. -1u would be fine.
Thanks, I choose 0xffffff00 as you suggested, and will prepare v2 patch. Thanks, Shigeru-- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html