Unverified Commit c5883d55 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11096 usb: xhci: Check endpoint is valid before dereferencing it

Merge Pull Request from: @ci-robot 
 
PR sync from: Liao Chen <liaochen4@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/S55VLDRPXYPG3WGW67ECZKUDIMTEYK7T/ 
usb: xhci: Check endpoint is valid before dereferencing it

Jimmy Hu (1):
  usb: xhci: Check endpoint is valid before dereferencing it


-- 
2.34.1
 
https://gitee.com/src-openeuler/kernel/issues/IALIMI 
 
Link:https://gitee.com/openeuler/kernel/pulls/11096

 

Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parents 51af54fa e0930467
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -949,7 +949,10 @@ static void xhci_kill_endpoint_urbs(struct xhci_hcd *xhci,
	struct xhci_virt_ep *ep;
	struct xhci_ring *ring;

	ep = &xhci->devs[slot_id]->eps[ep_index];
	ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
	if (!ep)
		return;

	if ((ep->ep_state & EP_HAS_STREAMS) ||
			(ep->ep_state & EP_GETTING_NO_STREAMS)) {
		int stream_id;