lkml.org 
[lkml]   [2014]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 00/16] timers: Plug debugobject leaks and use del timer sync() in exit/teardown
Date
From
On 2014-03-24 08:29, Julia Lawall wrote:
>> Another thing I saw is
>>
>> del_timer(&bla->timer);
>> ....
>> kfree(&bla);
>
> In one case I saw the following:
>
> if (isac->dch.timer.function != NULL) {
> del_timer(&isac->dch.timer);
> isac->dch.timer.function = NULL;
> }
> kfree(isac->mon_rx);
> isac->mon_rx = NULL;
>
> Is the assignment isac->dch.timer.function = NULL good enough to
> solve
> the problem?

No. It might lead to a NULL dereference when the other core wants
to call the callback. Same situation as in the other picture.

Thanks,

tglx



\
 
 \ /
  Last update: 2014-03-24 10:42    [W:0.043 / U:1.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site