* Re: [patch 3/3] OMAP: cs should be positive in gpmc_cs_free()
[not found] <200911172239.nAHMd6Js018329@imap1.linux-foundation.org>
@ 2009-11-18 18:37 ` Tony Lindgren
0 siblings, 0 replies; only message in thread
From: Tony Lindgren @ 2009-11-18 18:37 UTC (permalink / raw)
To: akpm; +Cc: rmk, linux-arm-kernel, roel.kluin, linux-omap
* akpm@linux-foundation.org <akpm@linux-foundation.org> [091117 14:39]:
> From: Roel Kluin <roel.kluin@gmail.com>
>
> The index `cs' is signed, test whether it is negative before we release
> gpmc_cs_mem[cs].
I've added this too to omap-fixes and will send to Linus.
Regards,
Tony
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> Acked-by: Tony Lindgren <tony@atomide.com>
> Cc: Russell King <rmk@arm.linux.org.uk>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> arch/arm/mach-omap2/gpmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN arch/arm/mach-omap2/gpmc.c~omap-cs-should-be-positive-in-gpmc_cs_free arch/arm/mach-omap2/gpmc.c
> --- a/arch/arm/mach-omap2/gpmc.c~omap-cs-should-be-positive-in-gpmc_cs_free
> +++ a/arch/arm/mach-omap2/gpmc.c
> @@ -405,7 +405,7 @@ EXPORT_SYMBOL(gpmc_cs_request);
> void gpmc_cs_free(int cs)
> {
> spin_lock(&gpmc_mem_lock);
> - if (cs >= GPMC_CS_NUM || !gpmc_cs_reserved(cs)) {
> + if (cs >= GPMC_CS_NUM || cs < 0 || !gpmc_cs_reserved(cs)) {
> printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs);
> BUG();
> spin_unlock(&gpmc_mem_lock);
> _
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-11-18 18:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200911172239.nAHMd6Js018329@imap1.linux-foundation.org>
2009-11-18 18:37 ` [patch 3/3] OMAP: cs should be positive in gpmc_cs_free() Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).