public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: "Nuno Sá" <nuno.sa@analog.com>, linux-clk@vger.kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>
Subject: Re: [RESEND RFC PATCH v2 0/4] Dynamic OF and use after free related fixes
Date: Mon, 12 Sep 2022 09:12:44 +0200	[thread overview]
Message-ID: <7d5b94e77c38d0c3351812d190790aa3db964afc.camel@gmail.com> (raw)
In-Reply-To: <6c8e89b04e41244c9ce1c0899d35bd6bb9c0555d.camel@gmail.com>

On Wed, 2022-07-13 at 15:24 +0200, Nuno Sá wrote:
> On Thu, 2022-06-23 at 14:18 +0200, Nuno Sá wrote:
> > This series is a collection of fixes with things I encountered when
> > handling a system with device tree overlays "fun". This effectively
> > means
> > removing and adding devices which led to me the found issues.
> > 
> > patch 1 is fairly straight and indeed an issue related with
> > of_nodes
> > not
> > being put.
> > 
> > For patches 2 and 3, they are only triggered if someone first
> > removes
> > the provider which is a dumb thing to do. However, I guess we
> > should
> > be
> > prepared for that and the framework even has some efforts to deal
> > with
> > these cases (eg: clk_nodrv_ops). That said, patch 2 is more or less
> > straight (even though catching the guilty line wasn't), we add
> > something
> > to a list during resgister, we need to remove it on the unregister
> > path.
> > Patch 3 is a different beast... though I think krefs are the proper
> > solution here, I'm not sure I covered all the corner cases with all
> > the
> > reparenting that might happen (mainly reason why this is RFC).
> > Nullyfing
> > clk_core->parent during unregister might suffice but I'm more in
> > favor
> > of proper refcounting (for now at least). Patch 3 also does not
> > have
> > a
> > fixes tag because I genuily don't know when this became a problem.
> > Maybe
> > right from the beginning?
> > 
> > Patch 4 is just a minor improvement and not really a fix...
> > 
> > v2:
> >  * add an helper function in '__set_clk_parents()' to set each
> > parent
> > separately;
> >  * massaged commit message in patch 2/4
> > ("clk: fix clk not being unlinked from consumers list") as per
> > Stephen
> > feedback.
> > 
> > Nuno Sá (4):
> >   clk: clk-conf: properly release of nodes
> >   clk: fix clk not being unlinked from consumers list
> >   clk: refcount the active parent clk_core
> >   clk: use clk_core_unlink_consumer() helper
> > 
> >  drivers/clk/clk-conf.c | 126 +++++++++++++++++++++++++------------
> > --
> > --
> >  drivers/clk/clk.c      |  83 +++++++++++++++++----------
> >  2 files changed, 131 insertions(+), 78 deletions(-)
> > 
> 
> Hi Michael and Stephen,
> 
> Is there anything missing on this one? I understand that maintainers
> are very busy people but this is already a RESEND and I already
> waited
> a fair amount of time before deciding for this mail.
> 
> Let me know if there's anything for me to do or if the series is just
> something you are not keen to apply (even though I think the series
> makes sense and makes the code more robust).
> 
> - Nuno Sá

Pinging this one more time... I'm happy to rebase and resend but it
would be nice to have some feedback. Otherwise I'll just forget about
this which is, honesty, very sad since I did spent some time on it :)
and it is fixing some real bugs (even though in reality are very hard
to trigger).

- Nuno Sá

      reply	other threads:[~2022-09-12  7:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 12:18 [RESEND RFC PATCH v2 0/4] Dynamic OF and use after free related fixes Nuno Sá
2022-06-23 12:18 ` [RESEND RFC PATCH v2 1/4] clk: clk-conf: properly release of nodes Nuno Sá
2022-06-23 12:18 ` [RESEND RFC PATCH v2 2/4] clk: fix clk not being unlinked from consumers list Nuno Sá
2022-06-23 12:18 ` [RESEND RFC PATCH v2 3/4] clk: refcount the active parent clk_core Nuno Sá
2022-06-23 12:18 ` [RESEND RFC PATCH v2 4/4] clk: use clk_core_unlink_consumer() helper Nuno Sá
2022-07-13 13:24 ` [RESEND RFC PATCH v2 0/4] Dynamic OF and use after free related fixes Nuno Sá
2022-09-12  7:12   ` Nuno Sá [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d5b94e77c38d0c3351812d190790aa3db964afc.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nuno.sa@analog.com \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox