lkml.org 
[lkml]   [2015]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] clk: Fix __clk_get access to already freed owner field.
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



\
 
 \ /
  Last update: 2015-02-05 22:21    [W:0.065 / U:2.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site