From: Dawson Engler <engler@csl.stanford.edu>
To: linux-kernel@vger.kernel.org
Cc: engler@csl.stanford.edu (Dawson Engler)
Subject: [CHECKER] race in 2.5.62/kernel/ptrace.c?
Date: Sat, 22 Mar 2003 11:47:17 -0800 (PST) [thread overview]
Message-ID: <200303221947.h2MJlHA24028@csl.stanford.edu> (raw)
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?)
next reply other threads:[~2003-03-22 19:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-22 19:47 Dawson Engler [this message]
2003-03-22 21:46 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200303221947.h2MJlHA24028@csl.stanford.edu \
--to=engler@csl.stanford.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®