Skip to contentSkip to conversation

Patch "usb: gadget: mv_udc_core: fix phy_regs I/O memory leak" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Jul 30, 2015

Subsystems (2)
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: gadget: mv_udc_core: fix phy_regs I/O memory leak

to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
usb-gadget-mv_udc_core-fix-phy_regs-i-o-memory-leak.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 53e20f2eb161fbe9eea28b54dccc870cec94eca2 Mon Sep 17 00:00:00 2001

From: Alexey Khoroshilov <[email protected]>
Date: Sun, 19 Jul 2015 23:13:28 +0700
Subject: usb: gadget: mv_udc_core: fix phy_regs I/O memory leak

From: Alexey Khoroshilov <[email protected]>

commit 53e20f2eb161fbe9eea28b54dccc870cec94eca2 upstream.

There was an omission in transition to devm_xxx resource handling. iounmap(udc->phy_regs) were removed, but ioremap() was left without devm_.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes 3517c31a8ece6 ("usb: gadget: mv_udc: use devm_xxx for probe")
---
 drivers/usb/gadget/udc/mv_udc_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/mv_udc_core.c +1 -1
@@ -2167,7 +2167,7 @@ static int mv_udc_probe(struct platform_
 		return -ENODEV;
 	}
 
-	udc->phy_regs = ioremap(r->start, resource_size(r));
+	udc->phy_regs = devm_ioremap(&pdev->dev, r->start, resource_size(r));
 	if (udc->phy_regs == NULL) {
 		dev_err(&pdev->dev, "failed to map phy I/O memory\n");
 		return -EBUSY;

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/usb-gadget-mv_udc_core-fix-phy_regs-i-o-memory-leak.patch