Skip to contentSkip to conversation

patch "usb: musb: tusb6010: uninitialized data in" added to usb-linus

PATCH [email protected] 1 participant 1 message Sep 21, 2021

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: musb: tusb6010: uninitialized data in

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 517c7bf99bad3d6b9360558414aae634b7472d80 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Thu, 16 Sep 2021 16:57:37 +0300
Subject: usb: musb: tusb6010: uninitialized data in
tusb_fifo_write_unaligned()

This is writing to the first 1 - 3 bytes of "val" and then writing all four bytes to musb_writel(). The last byte is always going to be garbage. Zero out the last bytes instead.

---
 drivers/usb/musb/tusb6010.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/musb/tusb6010.c +1 -0
index c42937692207..c968ecda42aa 100644
@@ -190,6 +190,7 @@ tusb_fifo_write_unaligned(void __iomem *fifo, const u8 *buf, u16 len)
 	}
 	if (len > 0) {
 		/* Write the rest 1 - 3 bytes to FIFO */
+		val = 0;
 		memcpy(&val, buf, len);
 		musb_writel(fifo, 0, val);
 	}
Signature · 1 line
2.33.0