From: Linus Torvalds <torvalds@linux-foundation.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
davidel@xmailserver.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: kerneloops.org: 2.6.28-rc regression in epoll (list corruption)
Date: Sun, 26 Oct 2008 11:58:06 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0810261141350.5200@nehalem.linux-foundation.org> (raw)
In-Reply-To: <20081026112920.28e7dccc@infradead.org>
On Sun, 26 Oct 2008, Arjan van de Ven wrote:
>
> This one is upcoming fast (and I just hit it as well)
>
> http://www.kerneloops.org/searchweek.php?search=ep_poll_callback
>
> seems epoll grew some list corruption....
It sounds very much like f337b9c58332bdecde965b436e47ea4c94d30da0 ("epoll:
drop unnecessary test") deleted a test that wasn't so unnecessary after
all..
That ep_poll_callback() code is:
/* If this file is already in the ready list we exit soon */
if (ep_is_linked(&epi->rdllink))
goto is_linked;
list_add_tail(&epi->rdllink, &ep->rdllist);
and the unnecessary test that was removed looks _very_ much like that kind
of code.
Thomas? Davide?
And if somebody knows how to reproduce this reliably, it would be really
good to hear if doing a revert on that thing just fixed it. It should
revert cleanly - it's the only change to fs/eventpoll.c since 2.6.27.
I'm somewhat inclined to revert it without even getting confirmation,
since I wanted to do an early -rc2 today with all the brown-paper-bag
fixes that have accumulated. But it would be good to get some
confirmation.
Btw, that whole logic in ep_send_events() sounds a bit scary. It says:
We can loop without lock because this is a task private list.
and it's true that "txlist" is a private list, but it still seems to
depend on the fact that none of the "struct epitem"s on that list can be
reached by any other means. And that whole thing depends on the magic
behaviour of 'ep->ovflist', but there are a lot of code sequences that do
*not* seem to test that at all.
Maybe the rqace/bug has always been there (ie some sequence that works
with an "epi->rdllink" without checking ovflist), but the "unnecessary"
test protected us from seeing it in practice.
Linus
next prev parent reply other threads:[~2008-10-26 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-26 18:29 Arjan van de Ven
2008-10-26 18:38 ` Davide Libenzi
2008-10-26 18:43 ` Rafael J. Wysocki
2008-10-26 18:58 ` Linus Torvalds [this message]
2008-10-26 19:33 ` Arjan van de Ven
2008-10-26 19:35 ` Davide Libenzi
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=alpine.LFD.2.00.0810261141350.5200@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=tglx@linutronix.de \
/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®