Re: [PATCH 2.6.39-rc5] ioremap: Delay sanity check until after asuccessful mapping

From: Suresh Siddha
Date: Thu Apr 28 2011 - 15:48:46 EST


On Thu, 2011-04-28 at 10:00 -0700, Tim Gardner wrote:
> While tracking down the reason for an ioremap() failure I was
> distracted
> by the WARN_ONCE() in __ioremap_caller(). Can we move the sanity
> check
> later in the function until _after_ the mapping has been performed?
>
> rtg
> --
> Tim Gardner tim.gardner@xxxxxxxxxxxxx
>
>
>
>
>
>
>
> differences
> between files
> attachment
> (0001-ioremap-Delay-sanity-check-until-after-a-successful-.patch)
>
> From 31dec327a254888fcd0b6aa963414b09626d3168 Mon Sep 17 00:00:00 2001
> From: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
> Date: Thu, 28 Apr 2011 10:07:51 -0600
> Subject: [PATCH] ioremap: Delay sanity check until after a successful
> mapping
>
> Performing a WARN_ONCE() sanity check before the mapping
> is successful seems pointless if the caller sends bad values.
> A case in point is when the BIOS provides erroneous screen_info values
> causing vesafb_probe() to request an outrageuous size. The
> WARN_ONCE is then wasted on bogosity. Move the warning to a
> point where the mapping has been successfully allocated.
>
> http://bugs.launchpad.net/bugs/772042

Sounds good to me.

Reviewed-by: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>

thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/