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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2017 11:12:44 -0800
From:   tip-bot for Vasyl Gomonovych <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, hpa@...or.com,
        gomonovych@...il.com, mingo@...nel.org
Subject: [tip:irq/urgent] irqchip/imgpdc: Use resource_size function on
 resource object

Commit-ID:  328bf1b29c3741de3c55f2b2e5179d18f16ba9c1
Gitweb:     https://git.kernel.org/tip/328bf1b29c3741de3c55f2b2e5179d18f16ba9c1
Author:     Vasyl Gomonovych <gomonovych@...il.com>
AuthorDate: Mon, 20 Nov 2017 23:02:41 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 23 Nov 2017 20:09:12 +0100

irqchip/imgpdc: Use resource_size function on resource object

drivers/irqchip/irq-imgpdc.c:327:20-23: WARNING: Suspicious code.
		resource_size is maybe missing with res_regs

Generated by: scripts/coccinelle/api/resource_size.cocci

Signed-off-by: Vasyl Gomonovych <gomonovych@...il.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: marc.zyngier@....com
Cc: jason@...edaemon.net
Link: https://lkml.kernel.org/r/1511215361-8279-1-git-send-email-gomonovych@gmail.com
---
 drivers/irqchip/irq-imgpdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c
index 1f59998..e80263e 100644
--- a/drivers/irqchip/irq-imgpdc.c
+++ b/drivers/irqchip/irq-imgpdc.c
@@ -325,7 +325,7 @@ static int pdc_intc_probe(struct platform_device *pdev)
 
 	/* Ioremap the registers */
 	priv->pdc_base = devm_ioremap(&pdev->dev, res_regs->start,
-				      res_regs->end - res_regs->start);
+				      resource_size(res_regs));
 	if (!priv->pdc_base)
 		return -EIO;
 

Powered by blists - more mailing lists