From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753495AbbJ0K1r (ORCPT ); Tue, 27 Oct 2015 06:27:47 -0400 Received: from mga03.intel.com ([134.134.136.65]:25516 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752313AbbJ0K1q (ORCPT ); Tue, 27 Oct 2015 06:27:46 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,204,1444719600"; d="scan'208";a="804169819" Date: Tue, 27 Oct 2015 12:27:23 +0200 From: Jarkko Sakkinen To: Christophe JAILLET Cc: kernel-janitors@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [tpmdd-devel] [PATCH] TPM: Avoid reference to potentially freed memory Message-ID: <20151027102723.GA9120@intel.com> References: <1445545961-5620-1-git-send-email-christophe.jaillet@wanadoo.fr> <20151023073733.GA6941@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151023073733.GA6941@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2015 at 10:37:33AM +0300, Jarkko Sakkinen wrote: > On Thu, Oct 22, 2015 at 10:32:41PM +0200, Christophe JAILLET wrote: > > Reference to the 'np' node is dropped before dereferencing the 'sizep' and > > 'basep' pointers, which could by then point to junk if the node has been > > freed. > > > > Refactor code to call 'of_node_pup' later. > > > > Signed-off-by: Christophe JAILLET > > LGTM. Is there anyone able to provide Tested-by for this? Christophe, were you able to reproduce the crash (insmod/rmmod couple of times maybe?) and validate that it was gone after fixing the bug? > Reviewed-by: Jarkko Sakkinen /Jarkko