lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 5 Sep 2016 19:24:05 +0200 From: Clemens Gruber <clemens.gruber@...ruber.com> To: Peter Chen <hzpeterchen@...il.com> Cc: linux-usb@...r.kernel.org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, linux-kernel@...r.kernel.org Subject: Re: chipidea: udc: kernel panic in isr_setup_status_phase On Mon, Sep 05, 2016 at 11:10:22AM +0800, Peter Chen wrote: > How about below, it will set halt for device, and host will get stall > from the device. > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > index 0f692fc..3c46ccb 100644 > --- a/drivers/usb/chipidea/udc.c > +++ b/drivers/usb/chipidea/udc.c > @@ -946,6 +946,11 @@ static int isr_setup_status_phase(struct ci_hdrc *ci) > int retval; > struct ci_hw_ep *hwep; > > + if (!ci->status) { > + WARN_ON(1); > + return -EPIPE; > + } > + > hwep = (ci->ep0_dir == TX) ? ci->ep0out : ci->ep0in; > ci->status->context = ci; > ci->status->complete = isr_setup_status_complete; > Returning -EPIPE works! I would however suggest to only warn once, as this otherwise floods the kernel log. I'll send a patch shortly, also adding a comment for people experiencing a similar hardware problem. Thank you very much for your help, Peter! Regards, Clemens
Powered by blists - more mailing lists