Re: [PATCH v1] usb: dwc3: gadget: sanity check for usb request complete function in ep_enqueue and giveback function.

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

 



hi,

Tang Jianqiang <jianqiang.tang@xxxxxxxxx> writes:
> From: Jianqiang Tang <jianqiang.tang@xxxxxxxxx>
>
> Do sanity check for usb request complete function as we hit random
> null pointer kernel panic in giveback function.
>
> From the call trace, show the complete function should be null.
> So we add the sanity check before every usb request queue to dwc3
> also before dwc3 giveback the usb request.
>
> Logs:
> BUG: unable to handle kernel NULL pointer dereference at   (null)
> IP: [<  (null)>]   (null)
> Call Trace:
> 	? dwc3_gadget_giveback+0xa5/0x130
> 	? vsnprintf+0x166/0x3d0
> 	dwc3_remove_requests+0x57/0x70
> 	__dwc3_gadget_ep_disable+0x18/0x80
> 	dwc3_gadget_ep_disable+0x79/0x1a0
> 	linkwatch_fire_event+0x4c/0x90
> 	gether_disconnect+0x45/0x1b0
> 	? wake_up_klogd+0x49/0x70
> 	console_unlock+0x295/0x4c0
> 	rndis_disable+0x3d/0x90
> 	preempt_count_add+0x55/0xa0
> 	reset_config+0x3b/0x90
> 	_raw_spin_lock_irqsave+0x25/0x30
> 	composite_disconnect+0x2f/0x50
> 	dwc3_gadget_disconnect_interrupt+0x62/0x90
>
> Signed-off-by: Jianqiang Tang <jianqiang.tang@xxxxxxxxx>

well, this is a gadget driver bug, not a dwc3 bug. This gadget driver
deserves to oops so we fix it. Care to provide information on how to
reproduce this ? Which kernel did you use ? Which platform ? Are you
using a vanilla kernel from Linus ?

cheers

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux