[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131017135339.GA29182@redhat.com>
Date: Thu, 17 Oct 2013 15:53:39 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Eric Wong <normalperson@...t.net>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Al Viro <viro@...iv.linux.org.uk>,
Davide Libenzi <davidel@...ilserver.org>,
Pekka Enberg <penberg@...helsinki.fi>,
Peter Hurley <peter@...leysoftware.com>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: epoll oops.
On 10/16, Eric Wong wrote:
>
> Oleg Nesterov <oleg@...hat.com> wrote:
> > Yes. Before that 971316f0503a hack epoll can't even know if the task
> > which did signalfd_poll() exits and frees the active signalfd_wqh.
> > If for example that task forked a child before exit.
> >
> > And the whole RCU logic is only needed if exit/ep_remove_wait_queue
> > actually race with each other.
>
> Is there any chance this oops is caused by (or at least more easily
> exposed by) commit 91cf5ab60ff82ecf4550a596867787c1e360dd3f ?
> (epoll: add a reschedule point in ep_free())
>
> I thought 91cf5ab would be benign, except...
>
> > Yes, ugly, agreed. d80e731ecab4 even tries to docunent that this all
> > is the hack.
>
> .. the following sentence from d80e731ecab4 caught my eye:
>
> It also assumes that nobody can take tasklist_lock under epoll
> locks, this seems to be true.
This just reminds that with this patch __wake_up/ep_poll_callback can
be called under write_lock(tasklist).
> I haven't been able to trace if cond_resched() can take tasklist_lock.
No, it can't hold the non-sleepable rwlock_t. And the sentence above
doesn't mean the locks like epmutex, it is mostlt about ep->lock.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists