Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2958586imu; Mon, 19 Nov 2018 08:37:46 -0800 (PST) X-Google-Smtp-Source: AJdET5cREjFcHyw8D3z2+QopQ/Tpao4GWeg8Rw8qQ6e4qIG3g7/jUgyodTzM7OabTgysBmYTj1Dd X-Received: by 2002:a63:f141:: with SMTP id o1mr21037771pgk.134.1542645466776; Mon, 19 Nov 2018 08:37:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645466; cv=none; d=google.com; s=arc-20160816; b=Hn0GZAKfuw+fc7kPNrdbN4jNYWvTG5GRhNXrEuFHSrjchQW96iP8BB/dZMF8Ls9Aj9 za6wnPTU7NwgkjkUI/H7FZoEYs1Ct1i766PvEbbRRC8BLTUwUaXw6fDDvOdti7k2Wv0J 6cKzU1RCX7hdREgZxDjcE/Zzh/Z7G6j8GlGnMp8bokkjVTxQck/ljJa9tvcUPi1/W6Z/ YwdEkmAhT9k8mGzxPX/aOFyu5UfF+rcZA5MWR1SBK23y4X/b0zEfrR6JTrIElBlKiAfA nqunKK+e8cMREY7i3GgSjmhohewUZINBNrhW2IahcSJS+DKKTu9b/VtPlK7soTFU8q5s 94tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j0Wlt9KNRpVj9iSuxNyj2qzs1NqIxCDh7a9TEHLYDg8=; b=N3GbrHx0369iygN/5YYfSOjg3XxCLEAl5BgyP/vL4z7fijLSo965GYAvsu4GzDDNkv RDrpNuEZEDh6M9U5dWOJXzBzh/EOXnwFxfcG9nsH0KhBNarMjTJK/sKyUDdvtNgAlA8F MSz2blhrex/zZiYtPF3iroiU/4l5BkrgUtBW/VC7SND0j5oGFkaDWjVE79rS5sMRGyE8 HCqATfyTUOpHqCv+N2DZQsn3tqWBTEEihjrh4ByozMHMq6E4fvKnauSfYm+jXi5sxZ+Y itoAi7F9wSKxbIFYb2jdhQ3dLPnLC43w7NBA6pHTmsNdMSu426xUKsS6e+ag6F+2RA9d JJ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SMepcocR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n33si37435774pgl.336.2018.11.19.08.37.31; Mon, 19 Nov 2018 08:37:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SMepcocR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731846AbeKTDAR (ORCPT + 99 others); Mon, 19 Nov 2018 22:00:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:60100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730366AbeKTDAR (ORCPT ); Mon, 19 Nov 2018 22:00:17 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4BAE42086A; Mon, 19 Nov 2018 16:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645368; bh=sQWUk5DFVQ6KpU9tOCAQIcuyna0g4rS8/qK4biTbPF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SMepcocRxjfG12oCilILJflAtn0qB48m51ERRrSAQHxdYZ2VUTOmMB46feYXevYBd dXeX5uaZLWGF0lqJecHicCUXpk97T+wlCv87J9kn0rUbXSGNDjKFvrAo6NWUvxHQBH aTLpAzXKnsMr5Apr6xRMRbbAfvFa3M2I2Yo8ASEo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Averin , Theodore Tso , stable@kernel.org Subject: [PATCH 4.19 135/205] ext4: fix possible inode leak in the retry loop of ext4_resize_fs() Date: Mon, 19 Nov 2018 17:27:22 +0100 Message-Id: <20181119162637.347511242@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vasily Averin commit db6aee62406d9fbb53315fcddd81f1dc271d49fa upstream. Fixes: 1c6bd7173d66 ("ext4: convert file system to meta_bg if needed ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.7 Signed-off-by: Greg Kroah-Hartman --- fs/ext4/resize.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -2058,6 +2058,10 @@ retry: n_blocks_count_retry = 0; free_flex_gd(flex_gd); flex_gd = NULL; + if (resize_inode) { + iput(resize_inode); + resize_inode = NULL; + } goto retry; }