This enables interrupts, and later scheduler_tick() locks runqueue
(without disabling interrupts). And if we are unlucky, new interrupt
comes at this point. And if this interrupt tries to do wake_up()
(like RTC interrupt does), we deadlock on runqueue lock :-( And
it is bad...
Problem was introduced by signal-fixes-2.5.59-A4, which spilt
original send_sig_info into two functions, and in one branch
it started using these unsafe spinlock variants (while group
variant uses irqsave/restore correctly).
Best regards,
Petr Vandrovec
diff -urdN linux/kernel/signal.c linux/kernel/signal.c
--- linux/kernel/signal.c 2003-05-09 04:35:12.000000000 +0200
+++ linux/kernel/signal.c 2003-05-10 01:55:24.000000000 +0200
@@ -1145,6 +1145,7 @@
int
send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
{
+ unsigned long flags;
int ret;
/*
@@ -1154,9 +1155,9 @@
* going away or changing from under us.
*/
read_lock(&tasklist_lock);
- spin_lock_irq(&p->sighand->siglock);
+ spin_lock_irqsave(&p->sighand->siglock, flags);
ret = specific_send_sig_info(sig, info, p);
- spin_unlock_irq(&p->sighand->siglock);
+ spin_unlock_irqrestore(&p->sighand->siglock, flags);
read_unlock(&tasklist_lock);
return ret;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/