arch/i386/kernel/signals.c: recalc_sigpending without spinlock

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Thu Jan 20 2000 - 09:05:19 EST


I think there is an error in do_signal():

       default:
            lock_kernel();
            sigaddset(&current->signal, signr);
            recalc_sigpending(current);
            current->flags |= PF_SIGNALED;
            do_exit(exit_code);
            /* NOTREACHED */
      }

I haven't checked the details of the signal delivery, but it seems that
the lock_kernel() is superflous, and
spin_lock_irq(&current->sigmask_lock) is missing:

       default:
            spin_lock_irq(&current->sigmask_lock);
            sigaddset(&current->signal, signr);
            recalc_sigpending(current);
            spin_unlock_irq(&current->sigmask_lock);
            current->flags |= PF_SIGNALED;
            do_exit(exit_code);
            /* NOTREACHED */
      }

--
	Manfred

- 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/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:22 EST