RE: [RFT PATCH 1/2] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-09-27 Thread Peter Chen
> Ensure that the shared_hcd pointer is valid when calling usb_put_hcd() > > The shared_hcd is removed and freed in xhci by first calling > usb_remove_hcd(xhci- > >shared_hcd), and later > usb_put_hcd(xhci->shared_hcd) > > Afer commit fe190ed0d602 ("xhci: Do not halt the host until both HCD

RE: [RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-09-27 Thread Peter Chen
> > Cc: > > Reported-by: Peter Chen > > Signed-off-by: Mathias Nyman > > --- > > drivers/usb/host/xhci-ring.c | 7 +++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/usb/host/xhci-ring.c > > b/drivers/usb/host/xhci-ring.c index f0a99aa..3d314b8 100644 > > ---

[PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-27 Thread Hal Emmerich
>From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001 From: Hal Emmerich Date: Thu, 19 Jul 2018 21:48:08 -0500 Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices  The bug would let the usb controller enter partial power down,  which was formally known as

Re: [RFT PATCH 1/2] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-09-27 Thread Chunfeng Yun
On Thu, 2018-09-27 at 19:26 +0300, Mathias Nyman wrote: > Ensure that the shared_hcd pointer is valid when calling usb_put_hcd() > > The shared_hcd is removed and freed in xhci by first calling > usb_remove_hcd(xhci->shared_hcd), and later > usb_put_hcd(xhci->shared_hcd) > > Afer commit

[PATCH] usb: usbtmc: check size before allocating buffer and remove duplicated allocation

2018-09-27 Thread Colin King
From: Colin Ian King Currently the allocation of a buffer is performed before a sanity check on the required buffer size and if the buffer size is too large the error exit return leaks the allocated buffer. Fix this by checking the size before allocating. Also, the same buffer is allocated

Re: [RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-09-27 Thread Mathias Nyman
On 27.09.2018 19:26, Mathias Nyman wrote: At xhci removal the USB3 hcd (shared_hcd) is removed before the primary USB2 hcd. Interrupts for port status changes may still occur for USB3 ports after the shared_hcd is freed, causing NULL pointer dereference. Check if xhci->shared_hcd is still

[RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-09-27 Thread Mathias Nyman
At xhci removal the USB3 hcd (shared_hcd) is removed before the primary USB2 hcd. Interrupts for port status changes may still occur for USB3 ports after the shared_hcd is freed, causing NULL pointer dereference. Check if xhci->shared_hcd is still valid before handing USB3 port events Cc:

[RFT PATCH 1/2] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-09-27 Thread Mathias Nyman
Ensure that the shared_hcd pointer is valid when calling usb_put_hcd() The shared_hcd is removed and freed in xhci by first calling usb_remove_hcd(xhci->shared_hcd), and later usb_put_hcd(xhci->shared_hcd) Afer commit fe190ed0d602 ("xhci: Do not halt the host until both HCD have disconnected