Re: [PATCH v2] powerpc/mpc5xxx: Avoid dereferencing potentially freed memory

From: Michael Ellerman
Date: Thu Oct 15 2015 - 02:36:24 EST


On Thu, 2015-10-15 at 07:56 +0200, Christophe JAILLET wrote:
> Use 'of_property_read_u32()' instead of 'of_get_property()'+pointer
> dereference in order to avoid access to potentially freed memory.
>
> Use 'of_get_next_parent()' to simplify the while() loop and avoid the
> need of a temp variable.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> v2: Use of_property_read_u32 instead of of_get_property+pointer dereference
> *** Untested ***

Thanks.

Can someone with an mpc5xxx test this?

cheers


--
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/