Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1390329pxx; Fri, 30 Oct 2020 08:55:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWmjfL+XFjmmGUcc656TXjkyaa34qv2LTI7V+QFSSF8Za0K05mn9f9oyJozC0AylgGtSeb X-Received: by 2002:a17:906:268c:: with SMTP id t12mr3013946ejc.377.1604073349105; Fri, 30 Oct 2020 08:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604073349; cv=none; d=google.com; s=arc-20160816; b=GTEDDAvxKibHHtf3uPaewtn7/3C1nAwwb/1eCHLNMPOn2dhmU86XQdfgpgDgXZYBnW ltIh4gWo4geQz4eExcXrRHsUqtZKkmmrta0VjRJMtU2u0drqrLJgPP2xvwO6Vyp3Tlb5 GwaZLkLYgriI6/Kwm7cOzO+0hW6WsRHTnSih767qZBRkMMRAdwyVwTdtt5g4HD+d6tF0 UNJ5f1gbxK5sM8Joh2I1p6qqu6YxS306dajKexPcim3O+rvL3LFxszlShhSXhfg0+wNV H50FlgNGQt6aG18IU2XApr2cx6F45iu/1RbCh9rwPOwmdJl+UT2KIlxpi1WtZ1LHY1BS LuIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=4vb/jEomfVr9t/Z7lT0Li6Y+TLCIwj1uDghjq1gCguw=; b=U/dOyI3KcRsl1jA0/Q/M4lTy0oY5fz3Eld0E718pcmJ7dNX7VybC2vSDOYI/4CGr41 lLTFsnd7NR02X5Ywcxb0G7Qbx5d6j3T2BjOzaOHewrxSCsdkMRC9sHh5sK3H0JbKRakC k8q8hr77Ukj/HikL2TWsQYn4Ho1TpvSIyu3TLqYDDzHlAtZyJ/hBs4R0Ko/yqEEgj0YI SSKnjwvgwFku33ccJ3ui0B/6b5NXkfsTYRSEnxOt11+agiJI1nNW5jDerUk/YWnHbOQj JCX5yfrTaFY5AqYuG/qS+SfPuv6QUFVfu35S5La4pJZjZRAo/18Y8k2ugghGX0GOUaxU ce9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hPjOgip3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si1222119edy.197.2020.10.30.08.55.25; Fri, 30 Oct 2020 08:55:49 -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=@redhat.com header.s=mimecast20190719 header.b=hPjOgip3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727135AbgJ3PwI (ORCPT + 99 others); Fri, 30 Oct 2020 11:52:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52906 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726178AbgJ3PwI (ORCPT ); Fri, 30 Oct 2020 11:52:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604073127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4vb/jEomfVr9t/Z7lT0Li6Y+TLCIwj1uDghjq1gCguw=; b=hPjOgip3PEvHuNLJn28Ad6otu94KCk5vM55+QHUvxsX2HBY4x6nEXEfZ4gjwaj2EGtnow4 P5Sk8IgCSQcR/ZSO3qqTe7uABjH52+vhCiePsePj5RFCGP0PEIJo+NmOBQ1BweXixFI6KA VV1INdIBNKynT9gzEar7VKOVJV09//4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-1-I4Azvlc_PJqI_ZZd-SyNPg-1; Fri, 30 Oct 2020 11:52:03 -0400 X-MC-Unique: I4Azvlc_PJqI_ZZd-SyNPg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4271F393B5; Fri, 30 Oct 2020 15:52:01 +0000 (UTC) Received: from ovpn-66-212.rdu2.redhat.com (ovpn-66-212.rdu2.redhat.com [10.10.66.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90D1B18E45; Fri, 30 Oct 2020 15:52:00 +0000 (UTC) Message-ID: <09fa614adb555358d39ab606a8c6a2d89ba4a11d.camel@redhat.com> Subject: Re: [PATCH -next] fs: Fix memory leaks in do_renameat2() error paths From: Qian Cai To: Jens Axboe Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Rothwell , Linux Next Mailing List Date: Fri, 30 Oct 2020 11:52:00 -0400 In-Reply-To: <251c80d6-a2d0-4053-404f-bffd5a53313e@kernel.dk> References: <20201030152407.43598-1-cai@redhat.com> <251c80d6-a2d0-4053-404f-bffd5a53313e@kernel.dk> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3c5499fa56f568005648e6e38201f8ae9ab88015