Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1435362pxx; Fri, 30 Oct 2020 09:53:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTYVQGlPAWmGQlKh1PE352Fe9jCdD5Hf8784/lda7PQCsExlJ6ZDBfWNWo+ta1JRUpiN/Y X-Received: by 2002:a05:6402:293:: with SMTP id l19mr3454051edv.227.1604076828584; Fri, 30 Oct 2020 09:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604076828; cv=none; d=google.com; s=arc-20160816; b=ewXDoNZtAqr46Kov0erP17LPwKuJKE8FoPMgtzWgoTzJ5gVLm6ovw9UmozwqedhEhe /gRj5cAEhLqxjI/0zEtn6UNRFIOHQIHDrdlgWlse+Jy7G75CefcWZIIljonwn8q69oKF BIGzgghnPzd7uHWoXnJO/YmiFT1CZS/Vwl2P6dZpJbXkNg+y/jBOe4nEapfb9/0MQyC2 DnMy909CuUcWSUrLAe21MKo89xz7IsGOemCdZS5GW1GMpf3gq1h6FDspkoNawJooX4n4 AWgvKZ//k1whxXraE1psW4lFxYp+TU6xQE6rav4CAQtNG/Mof0dKD4WaBmIjjrpQjU0p rXKg== 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=tG+n/t1qBUCj/v91rLdw/q5jo3ynBwp9llr1Pk6zEPE=; b=bk3mzyYA/mCmK8q2b+zHgIpEo91tcItObuO8xo7NJuq9b+KsxEn9OgPlwdPP8q1cHo zrCBMsV4BtR4dTHT4yJPFVww1VBBzVkabRSLCQ1Go5Jr+9CZvaPGJ/TV1VKaejSCFFeh e78pK9mZ0o3noQJR6pDHFr2RZonM/HLvJBarZGAL4qKNpGoC8X/7tgFrja2MdOtJdevB xVxlj08KBBxM01zFzNjHZfs3SP/3Ml28VdAVRlc9pVFVMcdWb01JGzzONIqGt0v54Idj 8xoa8xItVQ4LQnBLrr7ylpN979bLmKWoVqlgTYPBWCcme64NfHp2k3VEMqa7NoEf/r7o V80w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=l8D1Ji+X; 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 3si4620101ejz.513.2020.10.30.09.53.25; Fri, 30 Oct 2020 09:53:48 -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=l8D1Ji+X; 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 S1727072AbgJ3Qti (ORCPT + 99 others); Fri, 30 Oct 2020 12:49:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727109AbgJ3Qti (ORCPT ); Fri, 30 Oct 2020 12:49:38 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1E2DC0613CF for ; Fri, 30 Oct 2020 09:49:36 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id z5so8224033iob.1 for ; Fri, 30 Oct 2020 09:49:36 -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=tG+n/t1qBUCj/v91rLdw/q5jo3ynBwp9llr1Pk6zEPE=; b=l8D1Ji+XaROHEacSN2Rjdc7PFJjkcXtiPo8gC7oxf46mBeSxyFW+VH3f+CDlnsjmQ3 tRqLM8UACXn+ZDZYvN1CuE7DksVY91gtlEk+TkxLBX5n9K8RmBojLDJ6ZD+M/zAvuTG/ bjrKnXsoZ9PZMwoau41Pm43aj3uRXeZ17zMBKXDHpIWcCZ3sHJE+nARyFvDzMQ+TLnKU 8JKS3Hh036P+gJH7adFif2JEgvMCOlunyoc+nJUEaLan+t5q22dMEu3dnBiezLwTaGzr yqKCo5rI5Dr36LssyX9YEnEP+PcK81z2BbS9YwKYDgeL0KqERQ1uOHjur9fQ84NhMyt7 1Fnw== 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=tG+n/t1qBUCj/v91rLdw/q5jo3ynBwp9llr1Pk6zEPE=; b=ivq2TtMA05lYHx99rU8Iuarh7FiB5ikFJ67sVgwEDChk5WSygiJ5MOJr5W4xKP9N5M R8+AIkomuvE70QjucDAPLlb5feS1n2C6rJfZUdgEgU6W9yjJALbSlGcmZYoPcw34hrv/ 5otdPXR0Tdj6Zk5UJvlKO/2Vgu89O+ExIGETbSf9W8KEe6aOmiV/LkD8Yvvq3Xb14rUH Y3mg/xvFy0hbKvLl4Qj4oz72OwIo9IcSfR9PECWAPVrTi9kZKEMa/alKp0ChJO6vJlaf PQGPkCAX+6W93iA8O+gdLp2/wEcZ+L4RsB4WVU4lRUC/CBtRFpotoQYdSCCSEOgHPj8T 6YPg== X-Gm-Message-State: AOAM531I73WINqOsrDV1nGvIVUcz+9bulzFZS17YZOsvwp3EqzsMB1id aT4eTlI5L67YDC4UuiYvJdzT/g== X-Received: by 2002:a02:5d04:: with SMTP id w4mr2686525jaa.67.1604076576106; Fri, 30 Oct 2020 09:49:36 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id w68sm5844136ila.1.2020.10.30.09.49.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 09:49:35 -0700 (PDT) Subject: Re: [PATCH -next] fs: Fix memory leaks in do_renameat2() error paths To: Qian Cai Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Rothwell , Linux Next Mailing List References: <20201030152407.43598-1-cai@redhat.com> <251c80d6-a2d0-4053-404f-bffd5a53313e@kernel.dk> <09fa614adb555358d39ab606a8c6a2d89ba4a11d.camel@redhat.com> From: Jens Axboe Message-ID: Date: Fri, 30 Oct 2020 10:49:34 -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: <09fa614adb555358d39ab606a8c6a2d89ba4a11d.camel@redhat.com> 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 9:52 AM, Qian Cai wrote: > On Fri, 2020-10-30 at 09:27 -0600, Jens Axboe wrote: >> On 10/30/20 9:24 AM, Qian Cai wrote: >>> We will need to call putname() before do_renameat2() returning -EINVAL >>> to avoid memory leaks. >> >> Thanks, should mention that this isn't final by any stretch (which is >> why it hasn't been posted yet), just pushed out for some exposure. > > I don't know what other people think about this, but I do find a bit > discouraging in testing those half-baked patches in linux-next where it does not > even ready to post for a review. I don't disagree with that and this doesn't normally happen. I don't want to get into the reasonings, but things had to be shuffled which is why they ended up in -next before being posted this week. They will go out shortly. -- Jens Axboe