Skip to contentSkip to conversation

vlynq: fix another resource size off by 1 error

PATCH In review Dan Carpenter 2 participants 4 messages Aug 23, 2013 – Jan 13, 2014 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vlynq: fix another resource size off by 1 error

We fixed the call to request_mem_region() patch
3354f73 ('drivers/vlynq/vlynq.c: fix resource size off by 1 error'). But we need to fix the call the release_mem_region() as well.

---
Static checker stuff.

drivers/vlynq/vlynq.c +2 -1
index 7b07135..c0227f9 100644
@@ -762,7 +762,8 @@ static int vlynq_remove(struct platform_device *pdev)
 
 	device_unregister(&dev->dev);
 	iounmap(dev->local);
-	release_mem_region(dev->regs_start, dev->regs_end - dev->regs_start);
+	release_mem_region(dev->regs_start,
+			   dev->regs_end - dev->regs_start + 1);
 
 	kfree(dev);
 
#1 lore raw

We still need to apply this fix.

regards,
dan carpenter

Quoted 22 lines · Dan Carpenter

We fixed the call to request_mem_region() patch
3354f73 ('drivers/vlynq/vlynq.c: fix resource size off by 1 error'). But we need to fix the call the release_mem_region() as well.

---
Static checker stuff.

drivers/vlynq/vlynq.c +2 -1
index 7b07135..c0227f9 100644
@@ -762,7 +762,8 @@ static int vlynq_remove(struct platform_device *pdev)
 
 	device_unregister(&dev->dev);
 	iounmap(dev->local);
-	release_mem_region(dev->regs_start, dev->regs_end - dev->regs_start);
+	release_mem_region(dev->regs_start,
+			   dev->regs_end - dev->regs_start + 1);
 
 	kfree(dev);
 
#2 lore raw
Quoted 1 line · Le lundi 11 novembre 2013, 14:48:27 Dan Carpenter a écrit :

We still need to apply this fix.

Sorry for this late answer, vlynq changes usually go through AKPM's tree as I don't maintain one due to the low number of changes in this code.

Quoted 33 lines

regards,
dan carpenter

Quoted 13 lines · Dan Carpenter

We fixed the call to request_mem_region() patch
3354f73 ('drivers/vlynq/vlynq.c: fix resource size off by 1 error'). But we need to fix the call the release_mem_region() as well.

---
Static checker stuff.

drivers/vlynq/vlynq.c +0 -0
index 7b07135..c0227f9 100644

drivers/vlynq/vlynq.c static int vlynq_remove(struct platform_device *pdev) · line 769

Quoted 9 lines
drivers/vlynq/vlynq.c +2 -1
@@ -762,7 +762,8 @@ static int vlynq_remove(struct platform_device *pdev)
 
 	device_unregister(&dev->dev);
 	iounmap(dev->local);
 
-	release_mem_region(dev->regs_start, dev->regs_end - dev->regs_start);
+	release_mem_region(dev->regs_start,
+			   dev->regs_end - dev->regs_start + 1);
 
 	kfree(dev);

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

Signature · 5 lines
Florian
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH 1/1 vlynq: fix another resource size off by 1 error

We fixed the call to request_mem_region() patch
3354f73 ('drivers/vlynq/vlynq.c: fix resource size off by 1 error'). But we need to fix the call the release_mem_region() as well.

---
Resending (again) with Andrew's email corrected.

Hi, Andrew, Florian says this has to go through your tree. I assume that means he has Acked it. :)

drivers/vlynq/vlynq.c +2 -1
index 7b07135..c0227f9 100644
@@ -762,7 +762,8 @@ static int vlynq_remove(struct platform_device *pdev)
 
 	device_unregister(&dev->dev);
 	iounmap(dev->local);
-	release_mem_region(dev->regs_start, dev->regs_end - dev->regs_start);
+	release_mem_region(dev->regs_start,
+			   dev->regs_end - dev->regs_start + 1);
 
 	kfree(dev);
 

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html