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]
Message-Id: <20190214145231.8750-20-brgl@bgdev.pl>
Date:   Thu, 14 Feb 2019 15:52:13 +0100
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Sekhar Nori <nsekhar@...com>,
        Kevin Hilman <khilman@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>,
        Marc Zyngier <marc.zyngier@....com>,
        David Lechner <david@...hnology.com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: [PATCH v4 19/37] ARM: davinci: aintc: request memory region before remapping it

From: Bartosz Golaszewski <bgolaszewski@...libre.com>

Add a missing call to request_mem_region() before calling ioremap() to
make sure the region is not being used by anyone else.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
---
 arch/arm/mach-davinci/irq.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c
index 2afaf19dc46c..2b6943731af9 100644
--- a/arch/arm/mach-davinci/irq.c
+++ b/arch/arm/mach-davinci/irq.c
@@ -86,9 +86,18 @@ davinci_aintc_handle_irq(struct pt_regs *regs)
 void __init davinci_aintc_init(const struct davinci_aintc_config *config)
 {
 	unsigned int irq_off, reg_off, prio, shift;
+	void __iomem *req;
 	int ret, irq_base;
 	const u8 *prios;
 
+	req = request_mem_region(config->reg.start,
+				 resource_size(&config->reg),
+				 "davinci-cp-intc");
+	if (!req) {
+		pr_err("%s: register range busy\n", __func__);
+		return;
+	}
+
 	davinci_aintc_base = ioremap(config->reg.start,
 				     resource_size(&config->reg));
 	if (!davinci_aintc_base) {
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ