Re: [PATCH 2/3] clk: Prevent a hanging pointer being abused

From: Pavel Machek
Date: Wed Jul 30 2014 - 08:22:52 EST


On Tue 2014-07-22 14:20:33, Charles Manning wrote:
> Clock init structs are normally created on the stack.
>
> If the pointer is left intact after clk_register then there is
> opportunity for clk drivers to dereference the pointer.
>
> This was causing a problem in socfpga/clk.c for instance.
>
> Better to NULL out the pointer so it can't be abused.
>
> Signed-off-by: Charles Manning <cdhmanning@xxxxxxxxx>

Acked-by: Pavel Machek <pavel@xxxxxxx>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/