Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2958851imu; Mon, 19 Nov 2018 08:37:59 -0800 (PST) X-Google-Smtp-Source: AJdET5dodP81Sd7JmHlUIfQCKxV7T0Q4n+UACc8zC6BE/IbQ/sH9pyzyGEe6HneaOxGrn3HuzmDu X-Received: by 2002:a17:902:aa84:: with SMTP id d4-v6mr23377578plr.25.1542645479602; Mon, 19 Nov 2018 08:37:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645479; cv=none; d=google.com; s=arc-20160816; b=odJzrCR60pYoRZSXHR9D4B0+ZJxFmELMKyHNnkfPC4qgAn7aCrNpvdPKfIeVdXcAQM KGLA4NxeDtBnewLgvenwVOS1zMgk8kSv80D+3JYMhw2I+fr7+bQtajNs9dA2lc+dyyKS 3VxZfb9UHgwczWkYtkiUAny4lHtpufTfrFCqs0DX7+Nw2Q6H1RpluZGWO5wL4asm4seQ 01+D0XVz02YEt/QfWkSIJcX4wsT3qgee0JjdvUXbRl+I/c+vFaEmVKW7AG0huaW1JkZg wC9jTiov6YmF+dj8qGxG/zaw/J0cCCoXxz/89YxpJxC4yKzvUYFOVsKlyUDbd3Kunn5x VQAg== 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=Fc1/xS81G4QQbuLSjag0ZklXQK1rXws1Z4mA+TzgJmM=; b=BOan9KlWjPLYS6KRtkBvmTv4zdj0idGz5i7CGX9pcVg1MOGrBGxrU0gDLv4UsTIZ8j +x6Dez6B+7L7v1jaLezsB8iXQyLgSvyLi7GUNTq0txQeFjqj18Egu2k6SbLsz39VgGG6 ejbjUi89Klo9EizMQMH+jKg2rTPl+lFOGXkkdyUzNe1dgnR4dPS0Jph7V7/eOf7kahYG pxFYS9u7rdV1H1j3G9/XkBTMRUCCcPT1bmByiBxgfZb8Xu7qCadjYvElkV2cjpug14hM Z4JgodxA3WS885huztYZkEPRnkElj5nqCPDn6eG+Ojmz704cqVoaMdAZXuVuHFwk7KoK jWww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2jwxP0n6; 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 p23si37098931pgk.312.2018.11.19.08.37.44; Mon, 19 Nov 2018 08:37:59 -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=2jwxP0n6; 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 S1731893AbeKTDA3 (ORCPT + 99 others); Mon, 19 Nov 2018 22:00:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:60322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730366AbeKTDA2 (ORCPT ); Mon, 19 Nov 2018 22:00:28 -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 80D8E213A2; Mon, 19 Nov 2018 16:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645380; bh=qvszzzOBocU9jsk39BIddESpBPqIVoZsESiYQm8luug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2jwxP0n6jyUzB7UwmCvWwbeTF0u6mb6M6xRwRdxa+tVBkdOZzgRK0pg9tXH0GcbQx UXbpkrEdkf5yVGtn19L3Ksn3P2AhNNauAFob040w8sOGVI+cauawC/E5A6yOBXEoFg /mOdUCBo8tmfHozW4NMUHyHus4z2w4xBzCz0kkbc= 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 139/205] ext4: avoid possible double brelse() in add_new_gdb() on error path Date: Mon, 19 Nov 2018 17:27:26 +0100 Message-Id: <20181119162637.723496883@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: Theodore Ts'o commit 4f32c38b4662312dd3c5f113d8bdd459887fb773 upstream. Fixes: b40971426a83 ("ext4: add error checking to calls to ...") Reported-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.38 Signed-off-by: Greg Kroah-Hartman --- fs/ext4/resize.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -871,6 +871,7 @@ static int add_new_gdb(handle_t *handle, err = ext4_handle_dirty_metadata(handle, NULL, gdb_bh); if (unlikely(err)) { ext4_std_error(sb, err); + iloc.bh = NULL; goto exit_inode; } brelse(dind);