[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <474c981bb41f7c1a23e600c858500461@www.linutronix.de>
Date: Mon, 24 Mar 2014 10:03:57 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Julia Lawall <julia.lawall@...6.fr>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch 00/16] timers: Plug debugobject leaks and use del_timer_sync() in exit/teardown
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists