[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070207174355.GA340@tv-sign.ru>
Date: Wed, 7 Feb 2007 20:43:55 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Daniel Drake <dsd@...too.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
David Howells <dhowells@...hat.com>,
Simon Horman <horms@...ge.net.au>
Subject: Re: [PATCH 3/6] workqueue: make cancel_rearming_delayed_workqueue() work on idle dwork
On 02/07, Oleg Nesterov wrote:
>
> The following code
>
> schedule_delayed_work(dw);
> cancel_rearming_delayed_workqueue(dw); // OK
> cancel_rearming_delayed_workqueue(dw); // HANGS!
>
> still doesn't work.
I think we have another problem with delayed_works.
cancel_rearming_delayed_workqueue() doesn't garantee that the ->func() is not
running upon return. I don't know if it is bug or not, the comment says nothing
about that.
However, we have the callers which seem to assume the opposite, example
net/ipv4/ipvs/ip_vs_core.c
module_exit
ip_vs_cleanup
ip_vs_control_cleanup
cancel_rearming_delayed_work
// done
This is unsafe. The module may be unloaded and the memory may be freed
while defense_work_handler() is still running/preempted.
Unless I missed something, which side should be fixed?
Oleg.
-
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