lkml.org 
[lkml]   [1999]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] shaper fix for timer SMP races
On Wed, 17 Feb 1999, Ingo Molnar wrote:

>> shaper->timer running on the other CPU while you are deleting it. Yes, the
>> timerlist is preserved from corruption, but you may remove the vmalloced
>> module code while the shaper->timer is running.
>
>then it's enough to do this:
>
>+ del_timer(&shaper->timer);
>+ synchronize_bh(); /* wait for module code to be unused */
xxxxxxxxxxxxxxx

It's very more fun than that. The point is that we must have it not
running _while_ del_timer() is running. It doesn't care if it's not
running _after_ del_timer is been run.

In my last email I just specified well what I care in line
xxxxxxxxxxxxxxx, I quote myself:

>>we won't have the shaper->timer pending or _running_ anymore.
^^^^^^^

Your proposal doesn't assure the pending condition.

Andrea Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.052 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site