From: Thomas Gleixner <tglx@linutronix.de>
To: Xie Yongji <xieyongji@bytedance.com>,
bcrl@kvack.org, viro@zeniv.linux.org.uk, axboe@kernel.dk
Cc: linux-aio@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] aio: Fix incorrect usage of eventfd_signal_allowed()
Date: Tue, 14 Sep 2021 14:46:23 +0200 [thread overview]
Message-ID: <87ee9rcokg.ffs@tglx> (raw)
In-Reply-To: <20210913111928.98-1-xieyongji@bytedance.com>
On Mon, Sep 13 2021 at 19:19, Xie Yongji wrote:
> We should defer eventfd_signal() to the workqueue when
> eventfd_signal_allowed() return false rather than return
> true.
>
> Fixes: b542e383d8c0 ("eventfd: Make signal recursion protection a task bit")
> Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
> ---
> fs/aio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/aio.c b/fs/aio.c
> index 51b08ab01dff..8822e3ed4566 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -1695,7 +1695,7 @@ static int aio_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync,
> list_del(&iocb->ki_list);
> iocb->ki_res.res = mangle_poll(mask);
> req->done = true;
> - if (iocb->ki_eventfd && eventfd_signal_allowed()) {
> + if (iocb->ki_eventfd && !eventfd_signal_allowed()) {
Thanks for catching that!
> iocb = NULL;
> INIT_WORK(&req->work, aio_poll_put_work);
> schedule_work(&req->work);
next prev parent reply other threads:[~2021-09-14 12:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 11:19 [PATCH] aio: Fix incorrect usage of eventfd_signal_allowed() Xie Yongji
2021-09-14 12:46 ` Thomas Gleixner [this message]
2021-11-14 7:15 ` Yongji Xie
2021-12-07 11:38 ` Yongji Xie
2021-12-07 23:33 ` Eric Biggers
2021-12-10 18:53 ` Eric Biggers
2021-12-12 8:07 ` Yongji Xie
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=87ee9rcokg.ffs@tglx \
--to=tglx@linutronix.de \
--cc=axboe@kernel.dk \
--cc=bcrl@kvack.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=xieyongji@bytedance.com \
/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;
as well as URLs for NNTP newsgroup(s).