On 07/18, Jeremy Katz wrote:
On Wed, 18 Jul 2007, Oleg Nesterov wrote:
Jeremy, I agree with Thomas that your patch should not be right, but it
does make a difference. Perhaps this is just the timing, but who knows.
Could you add some printk's to be sure that lock_timer() actually fails
while it never should?
Agreed.
Unfortunately, adding any significant output appears to alter the
situation to the point where the issue either does not occur, or takes
significantly longer to surface.
No, no, I didn't mean any significant output. You changed itimer_delete()
> - spin_lock_irqsave(&timer->it_lock, flags);
> + /* timer already deleted? */
> + if (lock_timer(timer->it_id, &flags) == NULL)
> + return;
This change should not help, lock_timer() should always succeed here.
But since it makes a difference, we can make something like
if (lock_timer(timer->it_id, &flags) == NULL) {
printk("Impossible! but it happened.\n");
return;
}
The same for posix_timer_fn().
I still can't believe we have a double-free problem, this looks imposiible.
Do you see the
"idr_remove called for id=%d which is not allocated.\n"
in syslog?
Could you try the patch below? Perhaps we have some wierd problem with
->sigq corruption.