From: Andrew Morton <akpm@osdl.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: dmorris@metavize.com, linux-kernel@vger.kernel.org
Subject: Re: [2.6.2] Badness in futex_wait revisited
Date: Mon, 16 Feb 2004 21:27:58 -0800 [thread overview]
Message-ID: <20040216212758.437af444.akpm@osdl.org> (raw)
In-Reply-To: <20040217051911.6AC112C066@lists.samba.org>
Rusty Russell <rusty@rustcorp.com.au> wrote:
>
> - if (likely(!list_empty(&q.list)))
> + if (likely(!list_empty(&q.list))) {
> + current->flags |= PF_FUTEX_DEBUG;
> time = schedule_timeout(time);
> + current->flags &= ~PF_FUTEX_DEBUG;
> + }
> __set_current_state(TASK_RUNNING);
>
> /*
> diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .6375-linux-2.6.3-rc3-bk1/kernel/sched.c .6375-linux-2.6.3-rc3-bk1.updated/kernel/sched.c
> --- .6375-linux-2.6.3-rc3-bk1/kernel/sched.c 2004-02-15 18:17:22.000000000 +1100
> +++ .6375-linux-2.6.3-rc3-bk1.updated/kernel/sched.c 2004-02-17 12:02:24.000000000 +1100
> @@ -658,6 +658,14 @@ static int try_to_wake_up(task_t * p, un
> long old_state;
> runqueue_t *rq;
>
> + if ((p->flags & PF_FUTEX_DEBUG)
> + && !(current->flags & PF_FUTEX_DEBUG)) {
> + printk("%s %i waking %s: %i %i\n",
> + current->comm, (int)in_interrupt(),
> + p->comm, p->tgid, p->pid);
> + WARN_ON(1);
> + }
> +
If the schedule_timeout() expires then this wakeup will occur from within
the timer interrupt - current could point at any old thing. We will get
bogus warnings.
next prev parent reply other threads:[~2004-02-17 5:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <40311703.8070309@metavize.com>
2004-02-17 4:39 ` [2.6.2] Badness in futex_wait revisited Rusty Russell
2004-02-17 5:27 ` Andrew Morton [this message]
2004-02-18 4:14 ` Rusty Russell
2004-02-17 19:55 ` Dirk Morris
2004-03-31 16:56 ` Jamie Lokier
2004-03-31 17:38 ` Dirk Morris
2004-03-31 18:32 ` Jamie Lokier
2004-03-31 18:59 ` Dirk Morris
2004-04-01 2:16 ` Rusty Russell
2004-04-01 8:34 ` Andrew Morton
2004-04-01 9:24 ` Andrew Morton
2004-04-01 1:57 ` Rusty Russell
2004-02-13 21:13 Dirk Morris
2004-02-16 11:42 ` Rusty Russell
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=20040216212758.437af444.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=dmorris@metavize.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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