From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754869AbbJULlt (ORCPT ); Wed, 21 Oct 2015 07:41:49 -0400 Received: from ozlabs.org ([103.22.144.67]:53221 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753822AbbJULlq (ORCPT ); Wed, 21 Oct 2015 07:41:46 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 1856f50c66dff0afb4a6a3e22497ae153aec9411 In-Reply-To: <1445031525-20086-1-git-send-email-christophe.jaillet@wanadoo.fr> To: Christophe Jaillet , benh@kernel.crashing.org, paulus@samba.org From: Michael Ellerman Cc: kernel-janitors@vger.kernel.org, Christophe JAILLET , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [v2] powerpc/prom: Avoid reference to potentially freed memory Message-Id: <20151021114143.EE9111409F8@ozlabs.org> Date: Wed, 21 Oct 2015 22:41:43 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2015-16-10 at 21:38:45 UTC, 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 Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/1856f50c66dff0afb4a6a3e2 cheers