Re: [PATCH] bsdacct: delete timer with sync intension

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, March 31, 2010 - 12:56 pm

On Thu, 25 Mar 2010 17:35:10 +0300
Vitaliy Gusev <vgusev@openvz.org> wrote:


That sounds ugly.


Is this sufficient?  acct_file_reopen() does a del_timer(), so
acct_timeout() could be running concurrently with acct_file_reopen(),
but acct_file_reopen() is merrily altering data at *acct.

Perhaps acct_file_reopen() should be using del_timer_sync()?



check_free_space() is doing a similar thing:

	        del_timer(&acct->timer);
	        acct->needcheck = 0;

the currently-running timer handler now goes and sets needcheck again!


Methinks the whole thing needs a bit of a rethink, bearing in mind how
del_timer() actually works.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] bsdacct: delete timer with sync intension, Vitaliy Gusev, (Thu Mar 25, 7:35 am)
Re: [PATCH] bsdacct: delete timer with sync intension, Andrew Morton, (Wed Mar 31, 12:56 pm)