linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Muchun Song <songmuchun@bytedance.com>, viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, zhuyinyin@bytedance.com
Subject: Re: [PATCH v2 4/5] io_uring: Fix missing save the current thread files
Date: Tue, 6 Oct 2020 14:26:17 -0600	[thread overview]
Message-ID: <6f19c032-4b49-8eca-c264-be6f23751f70@kernel.dk> (raw)
In-Reply-To: <20200923114419.71218-5-songmuchun@bytedance.com>

On 9/23/20 5:44 AM, Muchun Song wrote:
> We forget to save the current thread files, in this case, we can not
> send SIGINT signal to the kworker because the files is not equal.
> 
> Fixes: 54ee77961e79 ("io_uring: Fix NULL pointer dereference in io_sq_wq_submit_work()")
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
> ---
>  fs/io_uring.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index 12e68ea00a543..c65f78f395655 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -2391,6 +2391,8 @@ static bool io_add_to_prev_work(struct async_list *list, struct io_kiocb *req)
>  	if (ret) {
>  		struct io_ring_ctx *ctx = req->ctx;
>  
> +		req->files = current->files;
> +
>  		spin_lock_irq(&ctx->task_lock);
>  		list_add(&req->task_list, &ctx->task_list);
>  		req->work_task = NULL;

This should be folded in with patch 1.

-- 
Jens Axboe


  reply	other threads:[~2020-10-06 20:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 11:44 [PATCH v2 0/5] io_uring: Fix async workqueue is not canceled on some corner case Muchun Song
2020-09-23 11:44 ` [PATCH v2 1/5] io_uring: Fix resource leaking when kill the process Muchun Song
2020-09-23 11:44 ` [PATCH v2 2/5] io_uring: Fix missing smp_mb() in io_cancel_async_work() Muchun Song
2020-09-23 11:44 ` [PATCH v2 3/5] io_uring: Fix remove irrelevant req from the task_list Muchun Song
2020-09-23 11:44 ` [PATCH v2 4/5] io_uring: Fix missing save the current thread files Muchun Song
2020-10-06 20:26   ` Jens Axboe [this message]
2020-09-23 11:44 ` [PATCH v2 5/5] io_uring: Fix double list add in io_queue_async_work() Muchun Song
2020-09-28 12:50 ` [PATCH v2 0/5] io_uring: Fix async workqueue is not canceled on some corner case Muchun Song
2020-10-06 20:26   ` Jens Axboe
2020-10-07  1:50     ` [External] " Muchun Song

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=6f19c032-4b49-8eca-c264-be6f23751f70@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=songmuchun@bytedance.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zhuyinyin@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).