Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp630071ybz; Wed, 15 Apr 2020 15:30:11 -0700 (PDT) X-Google-Smtp-Source: APiQypIksN2wHUsNUIhf7v6Pdlks7hcSx/JPELxeBjn4vAMuxNaltmGiUiOBZxlfIlb+G/fsmvXQ X-Received: by 2002:a17:906:b217:: with SMTP id p23mr6897245ejz.136.1586989811374; Wed, 15 Apr 2020 15:30:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586989811; cv=none; d=google.com; s=arc-20160816; b=Kn5+irUUVDKNhWSOhQz6zUzMZzJC+JGx4zLx+N1FjClPntOa0jK4IN73uZwIqTOQj7 bHFN9ngh7AzpH9YciNWwPe8Jz5UqVGvjVKnjxsGCBHXa3RaMYBJY6Z66WBa39s+3lSgs zgCooTPwF+NO+DkGxczGOXwIkEytb5wikifR2Nyg7SAuZ636jMWRD22lKVuftANGrUH5 Et5OiUKoVGmZ7HMTLm8L7bjOaQSAAjRpblMWJ8EQgT6XkfZSiEakG9Jpw0V3lhwve9dm zdP20A2zVt6ZRl4ZxzdCOTa3E26PYys3sOZ9Cv1X94nRKY2pXrRDzi+T6N8p9eDftwAl 8mFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=H7krFm0Xw7UIErgzRkTfT9s9toihwixLQOnNoyCbNgg=; b=RhTWfUg2v56D8aa9Dssotz36LtAL9Dk/waF7BqX45qGVaJ/czwXv/frjDekPE5XvZo 6yBUGjPSnZbQPUIxWVBNO1/zlstt8R3TegQ46q6JGpCb3ZYa6nvNM/1Iy40DgRV6xaZH pBMYERaEYXzcU/rYYs485Dgf/JfhiS9UzI4z4+z5ZjzpGRIXCU7/z2Iec4WBkEQBIBrW 7lN0lYWejU7fB8F9yTNB9VTYG8RoOO/GFp9LWkmqJREamAv3mu5DACROv2U8ykuKxQ6X vtZwFHqLDCQY/lycL4S2MddS1k9Vi4ExzUWQQTl20TEMN7piTXaWKhO9vzMwc/cZxNNn PuSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si10495645ejs.291.2020.04.15.15.29.48; Wed, 15 Apr 2020 15:30:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2635802AbgDOITQ (ORCPT + 99 others); Wed, 15 Apr 2020 04:19:16 -0400 Received: from mga14.intel.com ([192.55.52.115]:54840 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2635665AbgDOITH (ORCPT ); Wed, 15 Apr 2020 04:19:07 -0400 IronPort-SDR: AtVmOkZ5iXQkulkiLuQaNN09IgcEwdxYvhHiOGnEC9xsMiW9nq5POlz1HNutXIQnFpMndVp6s1 1PN6aDCjAtew== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2020 01:19:03 -0700 IronPort-SDR: 2HJ65msdaHbVcW7xthFam/nHvITp0InhlO/LPzyA+dy5DfmBfX6e7VfeLJrA35jpx1qr/iMXgP fnKryLT8SEyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,386,1580803200"; d="scan'208";a="363610060" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 15 Apr 2020 01:18:58 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 15 Apr 2020 11:18:58 +0300 Date: Wed, 15 Apr 2020 11:18:58 +0300 From: Heikki Krogerus To: Brendan Higgins Cc: gregkh@linuxfoundation.org, rafael@kernel.org, linux-kernel@vger.kernel.org, naresh.kamboju@linaro.org, sakari.ailus@linux.intel.com, andy.shevchenko@gmail.com, hdegoede@redhat.com, rafael.j.wysocki@intel.com, linux-kselftest@vger.kernel.org, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, andriy.shevchenko@linux.intel.com, shuah@kernel.org, anders.roxell@linaro.org, lkft-triage@lists.linaro.org, linux@rasmusvillemoes.dk Subject: Re: [PATCH v1] kobject: make sure parent is not released before children Message-ID: <20200415081858.GL2828150@kuha.fi.intel.com> References: <20200414204240.186377-1-brendanhiggins@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200414204240.186377-1-brendanhiggins@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 14, 2020 at 01:42:40PM -0700, Brendan Higgins wrote: > From: Heikki Krogerus This patch isn't from me. You can use a tag like "Proposed-by: Heikki..." or "Co-developed-by: Heikki..." in cases like this. > Previously, kobjects were released before the associated kobj_types; > this can cause a kobject deallocation to fail when the kobject has > children; an example of this is in software_node_unregister_nodes(); it > calls release on the parent before children meaning that children can be > released after the parent, which may be needed for removal. That makes it sound like it's software_node_unregister_nodes() that is releasing the parent, which isn't the case. > So, take a reference to the parent before we delete a node to ensure > that the parent is not released before the children. > > Reported-by: Naresh Kamboju > Fixes: 7589238a8cf3 ("Revert "software node: Simplify software_node_release() function"") > Link: https://lore.kernel.org/linux-kselftest/CAFd5g44s5NQvT8TG_x4rwbqoa7zWzkV0TX+ETZoQdOB7OwXCPQ@mail.gmail.com/T/#m71f37f3985f2abd7209c8ca8e0fa4edc45e171d6 > Co-developed-by: Brendan Higgins > Signed-off-by: Brendan Higgins > --- > > This patch is based on the diff written by Heikki linked above. > > Heikki, can you either reply with a Signed-off-by? No, I can't sign a patch that didn't actually pass trough my hands: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1 So in this case this patch is coming from _you_, not me, and there can't also be a "Signed-off-by: Heikki..." tag. You can use another tag to tell everybody that the change was originally proposed by me (I guess it's "Co-developed-by: Heikki..."?). Or just explain it in the commit message. thanks, -- heikki