[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180329180831.GA15948@lst.de>
Date: Thu, 29 Mar 2018 20:08:31 +0200
From: Christoph Hellwig <hch@....de>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Christoph Hellwig <hch@....de>, Avi Kivity <avi@...lladb.com>,
linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
netdev@...r.kernel.org, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/30] aio: add delayed cancel support
On Thu, Mar 29, 2018 at 03:25:06PM +0100, Al Viro wrote:
> OK. Let's leave that alone for now. Re deferred cancels - AFAICS, we *must*
> remove the sucker from ctx->active_reqs before dropping ->ctx_lock.
>
> As it is, you are creating a io_cancel()/io_cancel() race leading to double
> fput(). It's not that hard to fix; I can do that myself while applying your
> series (as described in previous posting - kiocb_cancel_locked() returning
> NULL or ERR_PTR() in non-deferred case and pointer to aio_kiocb removed from
> ->active_reqs in deferred one) or you could fix it in some other way and
> update your branch.
I think that is the right fix. Let me resend so that I can test the
result first.
Powered by blists - more mailing lists