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] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0908091444020.16252@ask.diku.dk>
Date:	Sun, 9 Aug 2009 14:44:41 +0200 (CEST)
From:	Julia Lawall <julia@...u.dk>
To:	Karsten Keil <isdn@...ux-pingi.de>
Cc:	isdn4linux@...tserv.isdn4linux.de, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/3] drivers/isdn/hisax: Correct use of
 request_region/request_mem_region

From: Julia Lawall <julia@...u.dk>

request_mem_region should be used when ioremap is used subsequently.
In this case, release_mem_region was already used where needed.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression start,E;
@@

- request_region
+ request_mem_region
    (start,...)
  ... when != request_mem_region(start,...)
      when != start = E
  ioremap(start,...)
// </smpl>

Signed-off-by: Julia Lawall <julia@...u.dk>

---
 drivers/isdn/hisax/isurf.c          |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
index ca41617..e1c3434 100644
--- a/drivers/isdn/hisax/isurf.c
+++ b/drivers/isdn/hisax/isurf.c
@@ -259,7 +259,8 @@ setup_isurf(struct IsdnCard *card)
 			cs->hw.isurf.reset);
 			return (0);
 	}
-	if (!request_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE, "isurf iomem")) {
+	if (!request_mem_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE,
+				"isurf iomem")) {
 		printk(KERN_WARNING "HiSax: Siemens I-Surf memory region "
 			"%lx-%lx already in use\n",
 			cs->hw.isurf.phymem,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ