* [email protected] <[email protected]> [091117 14:39]:
> From: Roel Kluin <[email protected]>
> 
> 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 <[email protected]>
> Acked-by: Tony Lindgren <[email protected]>
> Cc: Russell King <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
> ---
> 
>  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to