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: <D97B05D5-3ABF-4B47-97C7-A3EC629A1987@kernel.crashing.org>
Date:	Tue, 31 Aug 2010 16:39:11 -0500
From:	Kumar Gala <galak@...nel.crashing.org>
To:	Julia Lawall <julia@...u.dk>
Cc:	kernel-janitors@...r.kernel.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Grant Likely <grant.likely@...retlab.ca>,
	linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	devicetree-discuss@...ts.ozlabs.org
Subject: Re: [PATCH] arch/powerpc/platforms/83xx/mpc837x_mds.c: Add missing iounmap


On Aug 29, 2010, at 2:47 PM, Julia Lawall wrote:

> The function of_iomap returns the result of calling ioremap, so iounmap
> should be called on the result in the error handling code, as done in the
> normal exit of the function.
> 
> The sematic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r exists@
> local idexpression x;
> expression E,E1;
> identifier l;
> statement S;
> @@
> 
> *x = of_iomap(...);
> ...  when != iounmap(x)
>     when != if (...) { ... iounmap(x); ... }
>     when != E = x
>     when any
> (
> if (x == NULL) S
> |
> if (...) {
>  ... when != iounmap(x)
>      when != if (...) { ... iounmap(x); ... }
> (
>  return <+...x...+>;
> |
> *  return ...;
> )
> }
> )
> ... when != x = E1
>    when any
> iounmap(x);
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@...u.dk>
> 
> ---
> arch/powerpc/platforms/83xx/mpc837x_mds.c |    9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)

applied to merge

- k
--
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