mbox series

[SRU,Bionic/Cosmic/Unstable,v2,0/1] Fix usbcore.quirks when used at boot

Message ID 20181004054201.2812-1-kai.heng.feng@canonical.com
Headers show
Series Fix usbcore.quirks when used at boot | expand

Message

Kai-Heng Feng Oct. 4, 2018, 5:42 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1795784

[Impact]
Use usbcore.quirks kernel parameter let the boot stuck.

[Test]
Without the patch, the usbcore.quirks= doesn't work when usbcore is
builtin. The issue is fixed with the patch.

[Fix]
If the parameter is used at boot, parse the list after the slab is
initialized. When the kcalloc fails, reset the count to 0.

[Regression Potential]
Low. The change limits to quirk parsing, the usbcore behaviour stays the
same.

Harry Pan (1):
  usb: core: safely deal with the dynamic quirk lists

 drivers/usb/core/quirks.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Seth Forshee Oct. 4, 2018, 4:25 p.m. UTC | #1
On Thu, Oct 04, 2018 at 01:42:00PM +0800, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1795784
> 
> [Impact]
> Use usbcore.quirks kernel parameter let the boot stuck.
> 
> [Test]
> Without the patch, the usbcore.quirks= doesn't work when usbcore is
> builtin. The issue is fixed with the patch.
> 
> [Fix]
> If the parameter is used at boot, parse the list after the slab is
> initialized. When the kcalloc fails, reset the count to 0.
> 
> [Regression Potential]
> Low. The change limits to quirk parsing, the usbcore behaviour stays the
> same.

Acked-by: Seth Forshee <seth.forshee@canonical.com>

Applied to cosmic/master-next. I'm not applying to unstable as the
commit is included in 4.19-rc6. Thanks!
AceLan Kao Oct. 7, 2018, 8:44 a.m. UTC | #2
Acked-By: AceLan Kao <acelan.kao@canonical.com>

Applied to Binoic OEM kernel as this fix is critical to peojects.
Kleber Sacilotto de Souza Oct. 19, 2018, 2:45 p.m. UTC | #3
On 10/04/18 07:42, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1795784
> 
> [Impact]
> Use usbcore.quirks kernel parameter let the boot stuck.
> 
> [Test]
> Without the patch, the usbcore.quirks= doesn't work when usbcore is
> builtin. The issue is fixed with the patch.
> 
> [Fix]
> If the parameter is used at boot, parse the list after the slab is
> initialized. When the kcalloc fails, reset the count to 0.
> 
> [Regression Potential]
> Low. The change limits to quirk parsing, the usbcore behaviour stays the
> same.
> 
> Harry Pan (1):
>   usb: core: safely deal with the dynamic quirk lists
> 
>  drivers/usb/core/quirks.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Applied to bionic/master-next branch.

Thanks,
Kleber