lkml.org 
[lkml]   [2020]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] kobject: make sure parent is not released before children
On Tue, Apr 14, 2020 at 01:42:40PM -0700, Brendan Higgins wrote:
> From: Heikki Krogerus <heikki.krogerus@linux.intel.com>

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 <naresh.kamboju@linaro.org>
> 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 <brendanhiggins@google.com>
> Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
> ---
>
> 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

\
 
 \ /
  Last update: 2020-04-15 10:19    [W:0.946 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site