All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device()
@ 2016-09-07  6:22 Lu Baolu
  2016-09-07  6:51 ` Mathias Nyman
  0 siblings, 1 reply; 4+ messages in thread
From: Lu Baolu @ 2016-09-07  6:22 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: linux-usb, linux-kernel, Lu, Baolu, stable

From: "Lu, Baolu" <baolu.lu@linux.intel.com>

xhci_setup_device() should return failure with correct error number
when xhci host has died, removed or halted.

Cc: stable@vger.kernel.org # 4.3+
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/usb/host/xhci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 01d96c9..3e66e73 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3785,8 +3785,10 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 
 	mutex_lock(&xhci->mutex);
 
-	if (xhci->xhc_state)	/* dying, removing or halted */
+	if (xhci->xhc_state) {	/* dying, removing or halted */
+		ret = -ESHUTDOWN;
 		goto out;
+	}
 
 	if (!udev->slot_id) {
 		xhci_dbg_trace(xhci, trace_xhci_dbg_address,
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device()
  2016-09-07  6:22 [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device() Lu Baolu
@ 2016-09-07  6:51 ` Mathias Nyman
  2016-09-07  7:54   ` Lu Baolu
  0 siblings, 1 reply; 4+ messages in thread
From: Mathias Nyman @ 2016-09-07  6:51 UTC (permalink / raw)
  To: Lu Baolu; +Cc: linux-usb, linux-kernel, stable

On 07.09.2016 09:22, Lu Baolu wrote:
> From: "Lu, Baolu" <baolu.lu@linux.intel.com>
>
> xhci_setup_device() should return failure with correct error number
> when xhci host has died, removed or halted.
>

Thanks, will add.
Might go to 4.9 as 4.8-rc5 is already out

-Mathias

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device()
  2016-09-07  6:51 ` Mathias Nyman
@ 2016-09-07  7:54   ` Lu Baolu
  2016-09-07  8:08     ` Mathias Nyman
  0 siblings, 1 reply; 4+ messages in thread
From: Lu Baolu @ 2016-09-07  7:54 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: linux-usb, linux-kernel, stable

Hi Mathias,

On 09/07/2016 02:51 PM, Mathias Nyman wrote:
> On 07.09.2016 09:22, Lu Baolu wrote:
>> From: "Lu, Baolu" <baolu.lu@linux.intel.com>
>>
>> xhci_setup_device() should return failure with correct error number
>> when xhci host has died, removed or halted.
>>
>
> Thanks, will add.
> Might go to 4.9 as 4.8-rc5 is already out

I'm sorry, I just realized that "From" signature is different from
"Signed-off-by" signature in this patch.

Do you mind if I resend this patch with this fixed?

Best regards,
Lu Baolu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device()
  2016-09-07  7:54   ` Lu Baolu
@ 2016-09-07  8:08     ` Mathias Nyman
  0 siblings, 0 replies; 4+ messages in thread
From: Mathias Nyman @ 2016-09-07  8:08 UTC (permalink / raw)
  To: Lu Baolu; +Cc: linux-usb, linux-kernel, stable

On 07.09.2016 10:54, Lu Baolu wrote:
> Hi Mathias,
>
> On 09/07/2016 02:51 PM, Mathias Nyman wrote:
>> On 07.09.2016 09:22, Lu Baolu wrote:
>>> From: "Lu, Baolu" <baolu.lu@linux.intel.com>
>>>
>>> xhci_setup_device() should return failure with correct error number
>>> when xhci host has died, removed or halted.
>>>
>>
>> Thanks, will add.
>> Might go to 4.9 as 4.8-rc5 is already out
>
> I'm sorry, I just realized that "From" signature is different from
> "Signed-off-by" signature in this patch.
>
> Do you mind if I resend this patch with this fixed?
>

Not at all, I'll take v2

-Mathias

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-07  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-07  6:22 [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device() Lu Baolu
2016-09-07  6:51 ` Mathias Nyman
2016-09-07  7:54   ` Lu Baolu
2016-09-07  8:08     ` Mathias Nyman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.