LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Alban Browaeys <alban.browaeys@gmail.com>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Mike Turquette <mturquette@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] clk: Fix __clk_get access to already freed owner field.
Date: Thu, 05 Feb 2015 13:03:29 -0800	[thread overview]
Message-ID: <54D3DAA1.10803@codeaurora.org> (raw)
In-Reply-To: <1423168988.5723.38.camel@gmail.com>

On 02/05/15 12:43, Alban Browaeys wrote:
> Le jeudi 05 février 2015 à 11:30 -0800, Stephen Boyd a écrit :
>
>>> Signed-off-by: Alban Browaeys <prahal@yahoo.com>
>>> ---
>>>  drivers/clk/clk.c | 17 +++++++++--------
>>>  1 file changed, 9 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
>>> index df94668..8f33722 100644
>>> --- a/drivers/clk/clk.c
>>> +++ b/drivers/clk/clk.c
>>> @@ -2485,15 +2485,18 @@ EXPORT_SYMBOL_GPL(clk_register);
>>>   */
>>>  static void __clk_release(struct kref *ref)
>>>  {
>>> -	struct clk_core *clk = container_of(ref, struct clk_core, ref);
>>> -	int i = clk->num_parents;
>>> +	struct clk_core *core = container_of(ref, struct clk_core, ref);
>>> +	struct clk *clk = container_of(&core, struct clk, core);
>> How does this work? struct clk_core doesn't have a struct clk inside it.
>>
> Seems I am confused. The aim is  to get the clk struct from its core
> field. If I cannot do that from within __clk_release , this fix is
> doomed.
>

Thanks for the information. Can you please try the patch in this other
thread[1]? I think you're seeing the same problem.

[1] https://lkml.org/lkml/2015/2/5/595

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


  reply	other threads:[~2015-02-05 21:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 18:24 Alban Browaeys
2015-02-05 18:24 ` [PATCH 2/2] clk: Fix OOPS calling hlist_del on an already poisoned hlist Alban Browaeys
2015-02-05 19:33   ` Stephen Boyd
2015-02-05 20:56     ` Alban Browaeys
2015-02-05 19:30 ` [PATCH 1/2] clk: Fix __clk_get access to already freed owner field Stephen Boyd
2015-02-05 20:43   ` Alban Browaeys
2015-02-05 21:03     ` Stephen Boyd [this message]
2015-02-05 21:30       ` Alban Browaeys
2015-02-05 21:45         ` Stephen Boyd
2015-02-06  9:52           ` Alban Browaeys

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=54D3DAA1.10803@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=alban.browaeys@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=tomeu.vizoso@collabora.com \
    --subject='Re: [PATCH 1/2] clk: Fix __clk_get access to already freed owner field.' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).