[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBAEDdvoazY6UGbS@LQ3V64L9R2>
Date: Mon, 28 Apr 2025 15:41:17 -0700
From: Joe Damato <jdamato@...tly.com>
To: Carlos Llamas <cmllamas@...gle.com>
Cc: Jan Kara <jack@...e.cz>, Christian Brauner <brauner@...nel.org>,
linux-fsdevel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Sridhar Samudrala <sridhar.samudrala@...el.com>,
Alexander Duyck <alexander.h.duyck@...el.com>,
open list <linux-kernel@...r.kernel.org>,
Tudor Ambarus <tudor.ambarus@...aro.org>,
William McVicker <willmcvicker@...gle.com>
Subject: Re: [PATCH vfs/vfs.fixes v2] eventpoll: Set epoll timeout if it's in
the future
On Mon, Apr 28, 2025 at 10:32:31PM +0000, Carlos Llamas wrote:
> On Mon, Apr 28, 2025 at 09:50:02AM -0700, Joe Damato wrote:
> > Thank you for spotting that and sorry for the trouble.
>
> This was also flagged by our Android's epoll_pwait2 tests here:
> https://android.googlesource.com/platform/bionic/+/refs/heads/main/tests/sys_epoll_test.cpp
> They would all timeout, so the hang reported by Christian fits.
>
>
> > Christian / Jan what would be the correct way for me to deal with
> > this? Would it be to post a v3 (re-submitting the patch in its
> > entirety) or to post a new patch that fixes the original and lists
> > the commit sha from vfs.fixes with a Fixes tag ?
>
> The original commit has landed in mainline already, so it needs to be
> new patch at this point. If if helps, here is the tag:
> Fixes: 0a65bc27bd64 ("eventpoll: Set epoll timeout if it's in the future")
>
> > diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> > index 4bc264b854c4..1a5d1147f082 100644
> > --- a/fs/eventpoll.c
> > +++ b/fs/eventpoll.c
> > @@ -2111,7 +2111,9 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
> >
> > write_unlock_irq(&ep->lock);
> >
> > - if (!eavail && ep_schedule_timeout(to))
> > + if (!ep_schedule_timeout(to))
> > + timed_out = 1;
> > + else if (!eavail)
> > timed_out = !schedule_hrtimeout_range(to, slack,
> > HRTIMER_MODE_ABS);
> > __set_current_state(TASK_RUNNING);
>
> I've ran your change through our internal CI and I confirm it fixes the
> hangs seen on our end. If you send the fix feel free to add:
>
> Tested-by: Carlos Llamas <cmllamas@...gle.com>
Thanks, will do.
I was waiting to hear back from Christian / Jan if they are OK with
the proposed fix before submitting something, but glad to hear it
fixes the issue for you. Sorry for the trouble.
Powered by blists - more mailing lists