Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1673469pxx; Fri, 30 Oct 2020 16:24:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnRtJUVJaTh3GfCVGNWEFJF9aiUdDU8cOUw6JfvH4nlS1PeUmzYWHwJsV64SJhCQeWbT96 X-Received: by 2002:aa7:dcc7:: with SMTP id w7mr5079940edu.80.1604100296868; Fri, 30 Oct 2020 16:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604100296; cv=none; d=google.com; s=arc-20160816; b=b81fb3eXC3NZYYFafN1EwzmDlECb7IjxYbuwdVFoaV5yk7Yu0eL0DwYRx9hXJg1rAf fNgsCecRyeUfo1qDJOkiiQpABUCZDWtArtKjAt95a8Xq1l2LgDoaPDViPmQABdPZJ0TN j7BuCdxEtafT+wt4d3tIGvrTNg194UXJGU9cs0Tkd6QnLZwFjnZf9C/rzycgwWuTTQgR HV9u2kG9gz1EHTcBag0vzjXJ9h078qRQlcv+VVr4nyPtU748mt/v0Ly4kmuxNvX2/F+L 4cJ2PXy0Fmtk7/0LuqZ+DnauFcmYoDtBFN6pW74xZd4V09ASg4AdmMdrFUP5tOSkoyaa 4YyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=szW1ujHcKlBlbMuxSna8/x1FV/mLWXPIGi7WYHdP5RM=; b=nhxVUAc6blUPtt8Vl5W4N6UzxAWgfPvaoE8rQuUVFiNXdAKyGuPbmZQPNbjnBQsG6O 83q4fEzQF2g1ebnyK8xBSUva94P3ZphZjNxAuH3SsrvRPUHZ/sKAEoqiWha7PTh59V3G avW4P+VQ1eumEhEeAKGqTy0CIzyBqAYF494GtmzJz+frfjdAB/KD4roe5gD3gxqWq9us SLLKWsL9XiFwT+w3EqCn7nGWx7kF/e7lzUrMbkTfpHYFif88jRI1XQ1+RGc3/CC3HWBZ +oTumBboh4LtLQnQW0gH6/17gQoH7GSpNCjjyiw7fSaGWAAw7nwIqt1WNBKgbBhJQFqe qR1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=MRu1uNML; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si5643196eju.580.2020.10.30.16.24.31; Fri, 30 Oct 2020 16:24:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=MRu1uNML; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725841AbgJ3XVr (ORCPT + 99 others); Fri, 30 Oct 2020 19:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725681AbgJ3XVr (ORCPT ); Fri, 30 Oct 2020 19:21:47 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80D03C0613D7 for ; Fri, 30 Oct 2020 16:21:47 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id f38so6469666pgm.2 for ; Fri, 30 Oct 2020 16:21:47 -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=szW1ujHcKlBlbMuxSna8/x1FV/mLWXPIGi7WYHdP5RM=; b=MRu1uNMLSDq03iUk3DC0Pyz6AuV+8o119QEJ7Puem5z6bNl0q5bPjercQbL8bYsRoF dqkAeLhHPy3CZsdyVPycF7b9++R3t4rKKe8WWWJo+j1rWGHsEXuVb69iRFl7LV8HAv7D sUUals8KvsFxC1klknVWcsqZj5g6BwXcv4fctxjISJZ3m7O48K3ZGxuJ9tGSJl4Ao4m/ chODOm/qUrj+7qHI9Viv47dRIhWnChXLheBD/fqpepLGc144igZGAY/vDY3gQXa1VfFd QSUTWuHYP3Cc6n6pzJIQAgtAXcacZ1m5I6bB4u9ep4pVa0MuKFeYnCzcL0Od5oAu+5CI 0Dsg== 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=szW1ujHcKlBlbMuxSna8/x1FV/mLWXPIGi7WYHdP5RM=; b=aku61QO4+gkUU/qEU8OXwlhvHLh3DG9pqh2Ca4iNEBQI4cXEhZCf+3BGxVKvNLSc7B uRACK5IPXfZimsz6q3qj76ehauClKulh6DdewpGrh8pmvE5yR8D1CQ1nkB581f8mSJyk kb6j6JwPXZO2ur79S+FN3Fs4ctuf2i/wx8yZsOaVZ3OcbGHP969z1lCniePsSAKJwu9J SUmRpiT9QtNtoBQN7cvQmWeAZJSe1VALIkxmkgLPKHOfKDBrCz8fJxfA405fDGQnl+te krqEyAd5ByXG3KiEjmUYenmDMdn1KVd6rRQ+rPzlYzuwaoKjQDxXuMij/9Ubpg2KSMtk 7ddg== X-Gm-Message-State: AOAM532EyDkZpSbBznbySJhow0xAEw0FCykouAJG0SdXLB1qyfBPA2X4 G3A0pJPMCscPDlSrrmw7uKpk78/O59Ou9A== X-Received: by 2002:a62:1844:0:b029:152:80d3:8647 with SMTP id 65-20020a6218440000b029015280d38647mr11131900pfy.18.1604100106559; Fri, 30 Oct 2020 16:21:46 -0700 (PDT) Received: from [192.168.1.134] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id w205sm6744899pfc.78.2020.10.30.16.21.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 16:21:45 -0700 (PDT) Subject: Re: [PATCH -next] fs: Fix memory leaks in do_renameat2() error paths To: Al Viro Cc: Qian Cai , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201030152407.43598-1-cai@redhat.com> <20201030184255.GP3576660@ZenIV.linux.org.uk> <20201030184918.GQ3576660@ZenIV.linux.org.uk> <20201030222213.GR3576660@ZenIV.linux.org.uk> From: Jens Axboe Message-ID: Date: Fri, 30 Oct 2020 17:21:39 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201030222213.GR3576660@ZenIV.linux.org.uk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30/20 4:22 PM, Al Viro wrote: > On Fri, Oct 30, 2020 at 02:33:11PM -0600, Jens Axboe wrote: >> On 10/30/20 12:49 PM, Al Viro wrote: >>> On Fri, Oct 30, 2020 at 12:46:26PM -0600, Jens Axboe wrote: >>> >>>> See other reply, it's being posted soon, just haven't gotten there yet >>>> and it wasn't ready. >>>> >>>> It's a prep patch so we can call do_renameat2 and pass in a filename >>>> instead. The intent is not to have any functional changes in that prep >>>> patch. But once we can pass in filenames instead of user pointers, it's >>>> usable from io_uring. >>> >>> You do realize that pathname resolution is *NOT* offloadable to helper >>> threads, I hope... >> >> How so? If we have all the necessary context assigned, what's preventing >> it from working? > > Semantics of /proc/self/..., for starters (and things like /proc/mounts, etc. > *do* pass through that, /dev/stdin included) Don't we just need ->thread_pid for that to work? -- Jens Axboe