Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A37EC7EE2F for ; Thu, 2 Mar 2023 19:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229883AbjCBT0m (ORCPT ); Thu, 2 Mar 2023 14:26:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjCBT0l (ORCPT ); Thu, 2 Mar 2023 14:26:41 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87A80F979; Thu, 2 Mar 2023 11:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XyQ+env/WFzQBczlQSf7bynMeXK90337LwaiIbqlP4Q=; b=NZp9/w+BljZRYfN0HJfq/MvVZh JOhlD3X3UdbHu+8bCjV8AcYrDbr/2VTBF+zfODpIUQx06Tb4xbdTvSHxtTpGjddxdnNz0/lz8r4Uz OiOx1CK4cgyCznVYds4N6uHs1hNJyp6FKsunbyh8x3OVMy3OiQuSggtbW85gGFS+YuJ9m9Dc+yXIU uxveh8V3Fa82sitk5plgc46jb00TblN2vQTpKtFailc/40EVkVuZA1SJlg5RQDvEI+9Nd61RSO8+M AatXLmpFkbr7hHtW19M9u9fAOQFX1uclEjgi0PMYfMsjX3D9btjt2ZJCfGH2pgCML3XHH+sCSc1wF oPTNruZg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pXoZY-00DNfL-1w; Thu, 02 Mar 2023 19:26:36 +0000 Date: Thu, 2 Mar 2023 19:26:36 +0000 From: Al Viro To: Jan Kara Cc: "Fabio M. De Francesco" , Jan Kara , Linus Torvalds , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [git pull] vfs.git sysv pile Message-ID: References: <13214812.uLZWGnKmhe@suse> <20230301130018.yqds5yvqj7q26f7e@quack3> <20230302095931.jwyrlgtxcke7iwuu@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230302095931.jwyrlgtxcke7iwuu@quack3> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 02, 2023 at 10:59:31AM +0100, Jan Kara wrote: > OK, I think your changes to ext2_rename() in PATCH 1 leak a reference and > mapping of old_page In which case? ext2_delete_entry() failing? - ext2_delete_entry(old_de, old_page, old_page_addr); + err = ext2_delete_entry(old_de, old_page, old_page_addr); + if (err) + goto out_dir; and on out_dir: we have out_dir: if (dir_de) ext2_put_page(dir_page, dir_page_addr); out_old: ext2_put_page(old_page, old_page_addr); out: return err; How is the old_page leaked here?