lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D17263160@AcuExch.aculab.com>
Date:	Tue, 24 Jun 2014 14:06:05 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Mathias Nyman' <mathias.nyman@...ux.intel.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH 1/5] xhci: Use correct SLOT ID when handling a reset
 device command

From: Of Mathias Nyman
> Command completion events normally include command completion status,
> SLOT_ID, and a pointer to the original command. Reset device command
> completion SLOT_ID may be zero according to xhci specs 4.6.11.
> 
> VIA controllers set the SLOT_ID to zero, triggering a WARN_ON in the
> command completion handler.
> 
> Use the SLOT ID found from the original command instead.
> 
> This patch should be applied to stable kernels since 3.13 that contain
> the commit 20e7acb13ff48fbc884d5918c3697c27de63922a
> "xhci: use completion event's slot id rather than dig it out of command"
> 
> Cc: stable@...r.kernel.org # 3.13
> Reported-by: Saran Neti <sarannmr@...il.com>
> Tested-by: Saran Neti <sarannmr@...il.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@...ux.intel.com>
> ---
>  drivers/usb/host/xhci-ring.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index d67ff71..71657d3 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -1433,8 +1433,11 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
>  		xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code);
>  		break;
>  	case TRB_RESET_DEV:
> -		WARN_ON(slot_id != TRB_TO_SLOT_ID(
> -				le32_to_cpu(cmd_trb->generic.field[3])));
> +		/* SLOT_ID field in reset device cmd completion event TRB is 0.

Minor nit...
Surely is would be better to say 'is undefined' or 'may be zero'.

	David



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ