[PATCH] kupdated signal handling

From: Benjamin Herrenschmidt
Date: Tue Oct 07 2003 - 13:35:42 EST


Here's the fix to the problem we have been discussing...

===== fs/buffer.c 1.80 vs edited =====
--- 1.80/fs/buffer.c Sat Sep 13 20:09:44 2003
+++ edited/fs/buffer.c Wed Oct 1 11:27:07 2003
@@ -3068,13 +3068,13 @@
remove_wait_queue(&kupdate_wait, &wait);
/* check for sigstop */
if (signal_pending(tsk)) {
- int stopped = 0;
+ int sig, stopped = 0;
+ struct siginfo info;
+
spin_lock_irq(&tsk->sigmask_lock);
- if (sigismember(&tsk->pending.signal, SIGSTOP)) {
- sigdelset(&tsk->pending.signal, SIGSTOP);
+ sig = dequeue_signal(&current->blocked, &info);
+ if (sig == SIGSTOP)
stopped = 1;
- }
- recalc_sigpending(tsk);
spin_unlock_irq(&tsk->sigmask_lock);
if (stopped) {
tsk->state = TASK_STOPPED;


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