From: Andrew Morton <akpm@linux-foundation.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Davi Arnaut <davi@haxent.com.br>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] timerfd/eventfd context lock doesn't protect against poll_wait
Date: Thu, 17 May 2007 23:37:22 -0700 [thread overview]
Message-ID: <20070517233722.8d4be064.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0705172258400.5705@alien.or.mcafeemobile.com>
On Thu, 17 May 2007 23:20:05 -0700 (PDT) Davide Libenzi <davidel@xmailserver.org> wrote:
> On Fri, 18 May 2007, Davi Arnaut wrote:
>
> > Hi,
> >
> > poll_wait() callback may modify the waitqueue without holding the
> > context private lock.
>
> Thx Davi, patch is correct. Nice catch. But at this point instead of
> ending up getting two locks, we may look into using Andrew suggestion of
> reusing the waitqueue lock. Is it universally considered a "legal"
> operation?
>
I think it's a reasonable thing to do in core kernel code. It'd be more
worrisome if it was done way down in some rarely-visited device driver.
btw, the code at present doesn't explicitly take care of WQ_FLAG_EXCLUSIVE.
I guess as you want wake-all behaviour that's OK, but it might be worth a
mention somewhrre.
hm, fs/signalfd.c is "Copyright (C) 2003 Linus Torvalds". He was before
his time, that lad.
next prev parent reply other threads:[~2007-05-18 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-18 3:45 [PATCH] timerfd/eventfd context lock doesn't protect against poll_wait Davi Arnaut
2007-05-18 6:20 ` Davide Libenzi
2007-05-18 6:37 ` Andrew Morton [this message]
2007-05-18 14:45 ` Linus Torvalds
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=20070517233722.8d4be064.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davi@haxent.com.br \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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