[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegveuh3b0GMOmC3SuMOq=yi9sgBeOS2LGEetbfKqyS1xtQ@mail.gmail.com>
Date: Mon, 25 Nov 2019 13:38:38 +0100
From: Miklos Szeredi <miklos@...redi.hu>
To: Masayoshi Mizuma <msys.mizuma@...il.com>
Cc: linux-fsdevel@...r.kernel.org,
Masayoshi Mizuma <m.mizuma@...fujitsu.com>,
linux-kernel@...r.kernel.org, virtio-fs@...hat.com
Subject: Re: [PATCH] fuse: Fix the return code of fuse_direct_IO() to deal
with the error for aio
On Mon, Nov 18, 2019 at 3:24 AM Masayoshi Mizuma <msys.mizuma@...il.com> wrote:
>
> From: Masayoshi Mizuma <m.mizuma@...fujitsu.com>
>
> exit_aio() is sometimes stuck in wait_for_completion() after aio is issued
> with direct IO and the task receives a signal.
>
> That is because kioctx in mm->ioctx_table is in use by aio_kiocb.
> aio_kiocb->ki_refcnt is 1 at that time. That means iocb_put() isn't
> called correctly.
>
> fuse_get_req() returns as -EINTR when it's blocked and receives a signal.
> fuse_direct_IO() deals with the -EINTER as -EIOCBQUEUED and returns as
> -EIOCBQUEUED even though the aio isn't queued.
> As the result, aio_rw_done() doesn't handle the error, so iocb_put() isn't
> called via aio_complete_rw(), which is the callback.
Hi,
Thanks for the report.
Can you please test the attached patch (without your patch)?
Thanks,
Miklos
View attachment "fuse-fix-leak-of-fuse_io_priv.patch" of type "text/x-patch" (488 bytes)
Powered by blists - more mailing lists