From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932525AbcBZIEk (ORCPT ); Fri, 26 Feb 2016 03:04:40 -0500 Received: from mga03.intel.com ([134.134.136.65]:7536 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932121AbcBZIEi (ORCPT ); Fri, 26 Feb 2016 03:04:38 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,498,1449561600"; d="scan'208";a="753615205" Date: Fri, 26 Feb 2016 10:04:34 +0200 From: Heikki Krogerus To: "Shevchenko, Andriy" Cc: "rjw@rjwysocki.net" , "mika.westerberg@linux.intel.com" , "linux-kernel@vger.kernel.org" , "John.Youn@synopsys.com" Subject: Re: [PATCH 2/2] device property: fix for a case of use-after-free Message-ID: <20160226080434.GD29434@kuha.fi.intel.com> References: <1456152641-127948-1-git-send-email-heikki.krogerus@linux.intel.com> <1456152641-127948-3-git-send-email-heikki.krogerus@linux.intel.com> <1456155650.13244.24.camel@linux.intel.com> <1456160688.13244.30.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1456160688.13244.30.camel@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 22, 2016 at 05:04:04PM +0000, Shevchenko, Andriy wrote: > Considering this, perhaps better solution is to convert last lines to > > if (!IS_ERR(fwnode) && is_pset_node(fwnode)) { >   set_secondary_fwnode(dev, NULL); >   pset_free_set(to_pset_node(fwnode)); > } After some testing, this seems to work. I'll prepare v2 and use it. Thanks Andy, -- heikki