* a...@linux-foundation.org <a...@linux-foundation.org> [091117 14:39]: > From: Roel Kluin <roel.kl...@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.kl...@gmail.com> > Acked-by: Tony Lindgren <t...@atomide.com> > Cc: Russell King <r...@arm.linux.org.uk> > Signed-off-by: Andrew Morton <a...@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); > _ -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html