Messages in this thread | | | From | Dawson Engler <> | Subject | [CHECKER] race in 2.5.62/kernel/ptrace.c? | Date | Sat, 22 Mar 2003 11:47:17 -0800 (PST) |
| |
Is the following unlocked use of recalc_sigpending a race?
// 2.5.62/kernel/ptrace.c:339:ptrace_notify: void ptrace_notify(int exit_code) { BUG_ON (!(current->ptrace & PT_PTRACED));
/* Let the debugger run. */ current->exit_code = exit_code; set_current_state(TASK_STOPPED); notify_parent(current, SIGCHLD); schedule();
/* * Signals sent while we were stopped might set TIF_SIGPENDING. */ recalc_sigpending(); }
It seems that recalc_sigpending needs to be protected by ¤t->sighand->siglock
E.g.,:
2.5.62/kernel/signal.c:1656:sigprocmask: recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock);
2.5.62/kernel/signal.c:2115:sys_sigprocmas
spin_lock_irq(¤t->sighand->siglock); old_set = current->blocked.sig[0];
...
recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock);
Or does it not need a lock? (Or am I missing the lock?) - 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/
| |