[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21c34413-d178-fda0-91b2-6ab02c6d5a06@akamai.com>
Date: Thu, 30 Nov 2017 17:18:07 -0500
From: Jason Baron <jbaron@...mai.com>
To: Christoph Hellwig <hch@....de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Al Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: waitqueue lockdep annotation
On 11/30/2017 05:11 PM, Christoph Hellwig wrote:
> On Thu, Nov 30, 2017 at 04:38:02PM -0500, Jason Baron wrote:
>> I don't think there is a bug here. The 'wake_up_locked()' calls in epoll
>> are being protected by the ep->lock, not the wait_queue_head lock. So
>> arguably the 'annotation' is wrong, but I don't think there is a bug
>> beyond that.
>
> They can't be protected by ep->lock. The file might as well be
> watched for using poll or select as well, or just using epoll using
> another epoll fd.
>
Yes, but for those cases it uses the ep->poll_wait waitqueue not the
ep->wq, which is guarded by the ep->wq->lock.
See the comments in 'struct eventpoll':
/* Wait queue used by sys_epoll_wait() */
wait_queue_head_t wq;
/* Wait queue used by file->poll() */
wait_queue_head_t poll_wait;
Thanks,
-Jason
Powered by blists - more mailing lists