Messages in this thread | | | Date | Wed, 17 Feb 1999 16:13:47 +0100 (CET) | From | Andrea Arcangeli <> | Subject | Re: [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/
| |