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]
Date:   Thu,  6 Oct 2016 10:28:42 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org,
        Cristian Birsan <cristian.birsan@...rochip.com>,
        Joshua Henderson <joshua.henderson@...rochip.com>,
        Ladislav Michl <ladis@...ux-mips.org>,
        Felipe Balbi <balbi@...nel.org>,
        Tony Lindgren <tony@...mide.com>,
        Adam Ford <aford173@...il.com>
Subject: [PATCH 4.4 12/93] usb: musb: fix DMA for host mode

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Cristian Birsan <cristian.birsan@...rochip.com>

commit 4c2ba0c67394514f3f75c660c9f5d02e66a7efd4 upstream.

Commit ac33cdb16681 ("usb: musb: Remove ifdefs for musb_host_rx in
musb_host.c part5") introduces a problem setting DMA host mode.

The musb_advance_schedule() is called immediately after receiving an
endpoint RX interrupt without waiting for the DMA transfer to complete.

As a consequence when the dma complete interrupt arrives the in_qh
member of hw_ep is already null an the musb_host_rx() exits on !urb
error case. Fix the done condition that advances the musb schedule.

Signed-off-by: Cristian Birsan <cristian.birsan@...rochip.com>
Signed-off-by: Joshua Henderson <joshua.henderson@...rochip.com>
Tested-by: Ladislav Michl <ladis@...ux-mips.org>
Signed-off-by: Felipe Balbi <balbi@...nel.org>
Cc: Tony Lindgren <tony@...mide.com>
Cc: Adam Ford <aford173@...il.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
 drivers/usb/musb/musb_host.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -2008,10 +2008,8 @@ void musb_host_rx(struct musb *musb, u8
 				qh->offset,
 				urb->transfer_buffer_length);
 
-			done = musb_rx_dma_in_inventra_cppi41(c, hw_ep, qh,
-							      urb, xfer_len,
-							      iso_err);
-			if (done)
+			if (musb_rx_dma_in_inventra_cppi41(c, hw_ep, qh, urb,
+							   xfer_len, iso_err))
 				goto finish;
 			else
 				dev_err(musb->controller, "error: rx_dma failed\n");


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ