Thread (9 messages) 9 messages, 3 authors, 2015-10-21

Re: [PATCH v2] powerpc/prom: Avoid reference to potentially freed memory

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-10-19 09:28:01
Also in: kernel-janitors, lkml

On Fri, 2015-10-16 at 23:38 +0200, Christophe JAILLET wrote:
of_get_property() is used inside the loop, but then the reference to the
node is dropped before dereferencing the prop pointer, which could by then
point to junk if the node has been freed.

Instead use of_property_read_u32() to actually read the property
value before dropping the reference.

Signed-off-by: Christophe JAILLET <redacted>
---
v2: Fix missing '{'
*** COMPILE-TESTED ONLY ***
Thanks, this looks good. I'll test it on real hardware.

Can you send me a follow up which does the of_get_next_parent() conversion?

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help