From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F118AC43381 for ; Sun, 10 Mar 2019 07:07:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C05B5207E0 for ; Sun, 10 Mar 2019 07:07:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726280AbfCJHHW (ORCPT ); Sun, 10 Mar 2019 03:07:22 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:35298 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbfCJHHW (ORCPT ); Sun, 10 Mar 2019 03:07:22 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1h2sXK-0002pS-Qr; Sun, 10 Mar 2019 07:06:24 +0000 Date: Sun, 10 Mar 2019 07:06:18 +0000 From: Al Viro To: Linus Torvalds Cc: Eric Dumazet , David Miller , Jason Baron , kgraul@linux.ibm.com, ktkhai@virtuozzo.com, kyeongdon kim , Linux List Kernel Mailing , Netdev , pabeni@redhat.com, syzkaller-bugs@googlegroups.com, Cong Wang , Christoph Hellwig , zhengbin , bcrl@kvack.org, linux-fsdevel , linux-aio@kvack.org, houtao1@huawei.com, yi.zhang@huawei.com Subject: Re: [PATCH 1/8] aio: make sure file is pinned Message-ID: <20190310070606.GA10138@ZenIV.linux.org.uk> References: <20190307000316.31133-1-viro@ZenIV.linux.org.uk> <20190307004159.GY2217@ZenIV.linux.org.uk> <20190307004828.GZ2217@ZenIV.linux.org.uk> <20190307012036.GA2217@ZenIV.linux.org.uk> <20190308033650.GD2217@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190308033650.GD2217@ZenIV.linux.org.uk> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 08, 2019 at 03:36:50AM +0000, Al Viro wrote: > See vfs.git#work.aio; the crucial bits are in these commits: > keep io_event in aio_kiocb > get rid of aio_complete() res/res2 arguments > move aio_complete() to final iocb_put(), try to fix aio_poll() logics > The first two are preparations, the last is where the fixes (hopefully) > happen. OK, refactored, cleaned up and force-pushed. Current state: Al Viro (7): keep io_event in aio_kiocb aio: store event at final iocb_put() Fix aio_poll() races make aio_read()/aio_write() return int move dropping ->ki_eventfd into iocb_destroy() deal with get_reqs_available() in aio_get_req() itself aio: move sanity checks and request allocation to io_submit_one() Linus Torvalds (1): pin iocb through aio. fs/aio.c | 327 ++++++++++++++++++++++++++++----------------------------------- 1 file changed, 146 insertions(+), 181 deletions(-)