Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp114803imc; Sat, 9 Mar 2019 23:08:00 -0800 (PST) X-Google-Smtp-Source: APXvYqwUqy8hMTpST30oBX1PmXkEUGd158c5l5YnOXWnpBjvmmNxBqMGcON2xL6vtqGL6vekdrdf X-Received: by 2002:a17:902:20e5:: with SMTP id v34mr27799226plg.319.1552201680899; Sat, 09 Mar 2019 23:08:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552201680; cv=none; d=google.com; s=arc-20160816; b=IJOG0lFxXSuwRIHUgrhbezKjEdPnkkZeg5NnzRvnB3cObvOZzsvVYpakybstmVdxkG JTlX/ngbfF7IExFy25NaNhjXfYEsM2iW07s5qiT5xrWKSuBaCcNWe5sI6HNm6vXNaJmh jT8t8VK1s6sqMubfldrVp9zWELjYtTmcbjLzvKxqC22m2snnC9z6W75gBEss5Ild8SZb V/NRSz2ebzBOifah+rd5d2VhWdXQPUQySAqR+5gG7XLb1MKDki3+l/M753Fqn6fYoA6c og+e7/1kRUwRwX6lAHG8fDR0Wtnk3jyjh4eyd5HwPgSsUUWbnIykxmG4kteyd7+Erlmn v3NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=j42v1OGo0FE0tXT6nCwfc/X3D+AMw2kphb4VUa/rsZQ=; b=mOrgTdhRwNfZQz4ayq6z0Eat8VdB0a1ID9UOOhMHBiPexgoQ3K2JCcsVZ7pUJs6Aw2 ZdzIc57FSg1NABLJwG3tNqxbmSn4PSCZdXPOCILa3Brsm9qTc7m+R6ORzNlQ1G5Px1Lp l+n3hG8rZJebE9OO/y7ZcgYUrpaKMCb8N6+mrCXMl94VgCQ1M2jwKrlJJBLN15IV8rSS 25z9OmK9bcnF5FY3KfutyU8NOOwkmREupeQJY5PZjKbzsWpWSfsKrrkZ9277D/uQKAaL 8dpavSusMwuwkNpj3sk5Xyl/W3w7NKOZ/9iaXj99stNQnUHyogETkNfjhMvc+I4FwdVQ jXrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si2241970pgb.164.2019.03.09.23.07.44; Sat, 09 Mar 2019 23:08:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726078AbfCJHHW (ORCPT + 99 others); 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(-)