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.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 D1776C433E1 for ; Tue, 2 Jun 2020 18:42:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF4412072F for ; Tue, 2 Jun 2020 18:42:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="pfCMSAAG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728090AbgFBSma (ORCPT ); Tue, 2 Jun 2020 14:42:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgFBSm3 (ORCPT ); Tue, 2 Jun 2020 14:42:29 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75A2FC08C5C0 for ; Tue, 2 Jun 2020 11:42:29 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id 185so5488669pgb.10 for ; Tue, 02 Jun 2020 11:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=PXMdkD3GPBOdy4TKkm1MRMpxMLSNfOkVsVWMSCIDAqo=; b=pfCMSAAG9qdV0Nxo27gg96Rm8FcnE0zYXUSSCFqNm774ceLIl9dRmYBsUyHERF2f6y EBEiNStImLOpKpK0uSMSXWOA57BsmGCIJrAsSX/Qlb62FYF6oOCQS4vWxtv7JqWxKGJA 8pVrm7uV7DNQj7AWPtXgoKFxdqYp4l5O1lpCrc4LTEefRdrKRII4SIWcTaKxtFw8gcaa CGVYtg2Unh3RLvlhgW8oFaDZ/fry/HcvumUkahOhV8or9ne/Z4cIzBYGfKxFschxyUwU 7LDcsrwsSiBMUCa1cpLaIbX3EhGW2prnhfnsz9ghXgcJQInuefXfzed20Om0vXU5Airy f/oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PXMdkD3GPBOdy4TKkm1MRMpxMLSNfOkVsVWMSCIDAqo=; b=ZaodgB+8c1C1gt8lrL9XeuwTSOK+blDSGXh1QrcIcMrGPJFgJklWdexv08hB5Ezi6K fSpwztxDP9Y0IexU6BFQNf6q6pVpBk5xdLRqQW/5vYwzsy8nvL6bb1/kWnqCztsYtTch s61xLJf7ErilaAQacLDgVXbR++jaMZxTD5sWiJ8BWSs7/V0bQSJiXYyPjjOIavxLgTT7 u+cckerYNZ2k0y1PD7pl2sStXUmc9vMWzIhk1VVuE1maPjYtQ6acZXecDHSYIELRiQ7Z Zkck2NJc/hPWblX6kgkCnj3jEfzPzF5FjrN00QobFc5pTCu6MIngatvqkq6cbIIJEtmS iTBw== X-Gm-Message-State: AOAM53288HsEXz2VjFcdh41u5NAmc5HPN3XAeaFLh3XqP21EavtMBHQo PNozN9a73XWwZ6Y6z0pyJgjkn67yBxuMbg== X-Google-Smtp-Source: ABdhPJx2MLUfO3JxmoBKaExtlRzA3WAanBdOBRomVvXLHZe4uZamxuL/RgK3TmnQWlgcsFq+vxMaaA== X-Received: by 2002:a63:4a1d:: with SMTP id x29mr24710025pga.53.1591123348428; Tue, 02 Jun 2020 11:42:28 -0700 (PDT) Received: from [192.168.1.188] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id z18sm3005219pfj.148.2020.06.02.11.42.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jun 2020 11:42:27 -0700 (PDT) Subject: Re: IORING_OP_CLOSE fails on fd opened with O_PATH To: Jann Horn Cc: Clay Harris , io-uring References: <20200531124740.vbvc6ms7kzw447t2@ps29521.dreamhostps.com> <5d8c06cb-7505-e0c5-a7f4-507e7105ce5e@kernel.dk> <4eaad89b-f6e3-2ff4-af07-f63f7ce35bdc@kernel.dk> From: Jens Axboe Message-ID: <9c140709-f51f-af35-86c3-68fd02fffb18@kernel.dk> Date: Tue, 2 Jun 2020 12:42:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 6/2/20 12:22 PM, Jann Horn wrote: > On Sun, May 31, 2020 at 10:19 PM Jens Axboe wrote: >> We just need this ported to stable once it goes into 5.8-rc: >> >> https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.8/io_uring&id=904fbcb115c85090484dfdffaf7f461d96fe8e53 > > How does that work? Who guarantees that the close operation can't drop > the refcount of the uring instance to zero before reaching the fdput() > in io_uring_enter? Because io_uring_enter() holds a reference to it as well? -- Jens Axboe