* [U-Boot] [PATCH] usb: ehci-hcd: Fix crash when no ops are provided to ehci_register() @ 2016-04-03 11:38 Mateusz Kulikowski 2016-04-03 11:45 ` Bernhard Nortmann 2016-04-03 17:12 ` Marek Vasut 0 siblings, 2 replies; 3+ messages in thread From: Mateusz Kulikowski @ 2016-04-03 11:38 UTC (permalink / raw) To: u-boot This commit fixes crash on BananaPi (and possibly others) casued by 3f9f8a5b83f8aec40c9f4ee496046a695e333c45. Crash reason: When no ops were passed to ehci_register(), USB host driver caused NULL pointer dereference. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> --- drivers/usb/host/ehci-hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 598f444..fa5d584 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1615,8 +1615,8 @@ int ehci_register(struct udevice *dev, struct ehci_hccr *hccr, if (ret) goto err; - if (ops->init_after_reset) { - ret = ops->init_after_reset(ctrl); + if (ctrl->ops.init_after_reset) { + ret = ctrl->ops.init_after_reset(ctrl); if (ret) goto err; } -- 2.5.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] usb: ehci-hcd: Fix crash when no ops are provided to ehci_register() 2016-04-03 11:38 [U-Boot] [PATCH] usb: ehci-hcd: Fix crash when no ops are provided to ehci_register() Mateusz Kulikowski @ 2016-04-03 11:45 ` Bernhard Nortmann 2016-04-03 17:12 ` Marek Vasut 1 sibling, 0 replies; 3+ messages in thread From: Bernhard Nortmann @ 2016-04-03 11:45 UTC (permalink / raw) To: u-boot >This commit fixes crash on BananaPi (and possibly others) >casued by 3f9f8a5b83f8aec40c9f4ee496046a695e333c45. > >Crash reason: >When no ops were passed to ehci_register(), USB host driver caused >NULL pointer dereference. > >Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> >--- Confirmed working for Banana Pi, both on top of 3f9f8a5 and when applied to current master (563d8d9). Tested-by: Bernhard Nortmann <bernhard.nortmann@web.de> Regards, B. Nortmann ^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] usb: ehci-hcd: Fix crash when no ops are provided to ehci_register() 2016-04-03 11:38 [U-Boot] [PATCH] usb: ehci-hcd: Fix crash when no ops are provided to ehci_register() Mateusz Kulikowski 2016-04-03 11:45 ` Bernhard Nortmann @ 2016-04-03 17:12 ` Marek Vasut 1 sibling, 0 replies; 3+ messages in thread From: Marek Vasut @ 2016-04-03 17:12 UTC (permalink / raw) To: u-boot On 04/03/2016 01:38 PM, Mateusz Kulikowski wrote: > This commit fixes crash on BananaPi (and possibly others) > casued by 3f9f8a5b83f8aec40c9f4ee496046a695e333c45. > > Crash reason: > When no ops were passed to ehci_register(), USB host driver caused > NULL pointer dereference. > > Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Applied, thanks! Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-03 17:12 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-04-03 11:38 [U-Boot] [PATCH] usb: ehci-hcd: Fix crash when no ops are provided to ehci_register() Mateusz Kulikowski 2016-04-03 11:45 ` Bernhard Nortmann 2016-04-03 17:12 ` Marek Vasut
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox