RE: [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Felipe,

Oops, I completely forgot this patch.
Would you review this patch? Or should I resend it?
I confirmed that this patch could be applied on your latest testing/fixes branch.

Best regards,
Yoshihiro Shimoda

> -----Original Message-----
> From: Yoshihiro Shimoda
> Sent: Friday, December 25, 2015 8:26 PM
> To: gregkh@xxxxxxxxxxxxxxxxxxx; balbi@xxxxxx
> Cc: linux-usb@xxxxxxxxxxxxxxx; linux-sh@xxxxxxxxxxxxxxx; Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> Subject: [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()
> 
> A udc driver should set the giveback status to -ESHUTDOWN in
> usb_ep_disable(). Otherwise, a gadget driver (e.g. g_serial) might
> request next data wrongly and it is possible to cause kernel panic.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> ---
>  This patch is based on Felipe's usb.git / testing/fixes branch.
>  (commit id = 5072cfc40a80cea3749fd3413b3896630d8c787e)
> 
>  drivers/usb/renesas_usbhs/mod_gadget.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
> index 657f967..664b263 100644
> --- a/drivers/usb/renesas_usbhs/mod_gadget.c
> +++ b/drivers/usb/renesas_usbhs/mod_gadget.c
> @@ -561,7 +561,7 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
>  		if (!pkt)
>  			break;
> 
> -		usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET);
> +		usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ESHUTDOWN);
>  	}
> 
>  	usbhs_pipe_disable(pipe);
> --
> 1.9.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux