Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1943793ybv; Fri, 14 Feb 2020 08:38:10 -0800 (PST) X-Google-Smtp-Source: APXvYqyYtbn92EtTwNVyA02ib6xNGOddvShjjH56pi24PhIS09LCnpiHRmpcoppQ0x3PAt7zHamC X-Received: by 2002:a9d:12a2:: with SMTP id g31mr3124179otg.283.1581698290217; Fri, 14 Feb 2020 08:38:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581698290; cv=none; d=google.com; s=arc-20160816; b=JPqvulnl5PB5cvGD19LBuLOdcWTdqDMeOdYfTiuQoUVWz/ZOdEKFsI03xLhFrayaVl OOl4z8YY+Rq2PoXUNDBjTvdzxrTzzfm64EQMmmCiedHWMWZohwY9oDQTl2ehJX42Xcsh LYUf3dY8W8UWTQOUMQHVF8wToyeV3Miadp3UugmYob5nJCOfU9ypqKgbSL9RXwnx/eN3 hcyCw4SIwEfzcP80c9wQPJy7wKQ02WDteWgDbykjBUpDWO/tEygDr7OPzsIDrT1E09kg M4zOdo2yuiaWcPjXx7cBVBD7I99WxlgGSMtFEXqhQ03xlaRhOOjIuxPLPCE/imSwczG3 Hx1A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lEpO+sgxF+7Eju4L3QIPsfr2qYOnig8LE87i49Ba+Ew=; b=hLpQDfLDYCj722ycdvnP4H5tAl1dbXlWf4NSBL9wNhgz6zB4v3RtQOEiRniyjYveNm ZVVEPECyKMI0i8ybZRHnc3Hy5S+tt1IwMkhrljnhZm8uU7zBemryI3XEItlupZielBUD zY5aEAAQXoLNgXZmdPocpQ9lgE43fPIfBxXQDPHbwa9N3l3ZuXc2MD8Biq4FuBmkDJFE lxfN+4dG6sIFRHJQBRPXrSdEh3qwHxkwJFpwYdEUDj1QKhgq4qr31IQ8l7U0Zt+Tfndh NwJyyKi30FTHYF+86kcGdojL36xRJEoLUGEZscwXhBWx7MtNpAmNFzC6DEhhiTx1WC74 KSOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fTQ8uBfF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s77si2720385oih.51.2020.02.14.08.37.58; Fri, 14 Feb 2020 08:38:10 -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=fTQ8uBfF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405870AbgBNQYV (ORCPT + 99 others); Fri, 14 Feb 2020 11:24:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:58262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405487AbgBNQWf (ORCPT ); Fri, 14 Feb 2020 11:22:35 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51825246D4; Fri, 14 Feb 2020 16:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697355; bh=N9Jg8DQPfUghGf2xHXZsuspCOrZB+QrKBzCb02ko0ME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fTQ8uBfFa8l11bAmiGzSelXQrzxbex8fhSTXJ5EqzVCuIfzRDNdCiFYRFAjL6Nc2U OeoN6GtgQXA0Oi87xroDSxy8+KGTZEGTrsLJTrFtMC9ByxzJBkSCsm4DtP6Dad7To0 ZVzcsI4b5i8JhmJtUP2OI2k2h66w/GZ/2/2zGJ6o= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jan Kara , Sasha Levin , reiserfs-devel@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 057/141] reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling Date: Fri, 14 Feb 2020 11:19:57 -0500 Message-Id: <20200214162122.19794-57-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Kara [ Upstream commit 4d5c1adaf893b8aa52525d2b81995e949bcb3239 ] When we fail to allocate string for journal device name we jump to 'error' label which tries to unlock reiserfs write lock which is not held. Jump to 'error_unlocked' instead. Fixes: f32485be8397 ("reiserfs: delay reiserfs lock until journal initialization") Signed-off-by: Jan Kara Signed-off-by: Sasha Levin --- fs/reiserfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index bfed2a7000154..677608a89b08d 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -1928,7 +1928,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) if (!sbi->s_jdev) { SWARN(silent, s, "", "Cannot allocate memory for " "journal device name"); - goto error; + goto error_unlocked; } } #ifdef CONFIG_QUOTA -- 2.20.1