mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: bcrl@kvack.org, viro@zeniv.linux.org.uk, tglx@linutronix.de,
	axboe@kernel.dk, 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, 7 Dec 2021 15:33:47 -0800	[thread overview]
Message-ID: <Ya/vW/eGXCzbmvAC@sol.localdomain> (raw)
In-Reply-To: <20210913111928.98-1-xieyongji@bytedance.com>

On Mon, Sep 13, 2021 at 07:19:28PM +0800, 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()) {
>  			iocb = NULL;
>  			INIT_WORK(&req->work, aio_poll_put_work);
>  			schedule_work(&req->work);
> -- 
> 2.11.0
> 

Since I was just working with this file...:

Reviewed-by: Eric Biggers <ebiggers@google.com>

I don't know who is taking aio fixes these days, but whoever does so probably
should take this one at the same time as mine
(https://lore.kernel.org/linux-fsdevel/20211207095726.169766-1-ebiggers@kernel.org).

- Eric

  parent reply	other threads:[~2021-12-07 23:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 11:19 Xie Yongji
2021-09-14 12:46 ` Thomas Gleixner
2021-11-14  7:15 ` Yongji Xie
2021-12-07 11:38   ` Yongji Xie
2021-12-07 23:33 ` Eric Biggers [this message]
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=Ya/vW/eGXCzbmvAC@sol.localdomain \
    --to=ebiggers@kernel.org \
    --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=tglx@linutronix.de \
    --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

Powered by JetHome