All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: linux-kernel@vger.kernel.org, Andrea Arcangeli <andrea@suse.de>,
	David Mosberger <davidm@hpl.hp.com>
Subject: Re: [patch] proposed fix for ptrace() SMP race
Date: Mon, 10 Sep 2001 19:54:51 +0200	[thread overview]
Message-ID: <3B9CFE6B.1563125D@colorfullife.com> (raw)

>
> BTW, checking this stuff I found two bugs, one is the check for
> cpus_allowed before calling reschedule_idle,

The call in linux/kernel.c, around line 348?
348 if (!synchronous || !(p->cpus_allowed & (1 << smp_processor_id())))
349       reschedule_idle(p);

The test was added for wake_up_{,interruptible_}sync(): if the woken up
task is not permitted to run on the current cpu, reschedule() is
necessary, otherwise skip the reschedule.
If ptrace sets cpus_allowed to 0 between wake_up_sync() and schedule(),
the reschedule is lost. But always rescheduling would defeat the purpose
of wake_up_sync().

--
	Manfred

             reply	other threads:[~2001-09-10 17:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-10 17:54 Manfred Spraul [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-06 23:00 [patch] proposed fix for ptrace() SMP race David Mosberger
2001-09-07  0:19 ` Andrea Arcangeli
2001-09-07  0:40   ` David Mosberger
2001-09-07  1:28     ` Andrea Arcangeli
2001-09-07  1:41       ` Alan Cox
2001-09-07 13:34         ` Andrea Arcangeli
2001-09-07  5:21       ` David Mosberger
2001-09-07 13:28         ` Andrea Arcangeli
2001-09-07 15:35           ` David Mosberger
2001-09-08 17:11             ` Andrea Arcangeli
2001-09-10 17:20               ` David Mosberger

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=3B9CFE6B.1563125D@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=andrea@suse.de \
    --cc=davidm@hpl.hp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.