From patchwork Thu Feb 27 13:34:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 230212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1139BC76562 for ; Thu, 27 Feb 2020 14:37:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CEBFF24656 for ; Thu, 27 Feb 2020 14:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582814266; bh=fXnsoQjwnpZgRXM5im4681pzskBGblpLjTDxl2J7dKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=P51dpvC0CL8NOvLXLNR5NeMcyXtT8IdZf0u6ebLl8qbPuZE9WbJT1FD5P3Ao6y3mk 8Ky4cZFxmcI9ptG2ebenhYJp1q9w9UEEaCjnw6bs8Sw/5bhoW+K0EVqbnc8CumDUWU J5RdqgqSJKaKW3AuCfo+NFrm3TiljQ2qbBXL2mGU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732245AbgB0N5K (ORCPT ); Thu, 27 Feb 2020 08:57:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:57930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732072AbgB0N5K (ORCPT ); Thu, 27 Feb 2020 08:57:10 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 5615120578; Thu, 27 Feb 2020 13:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582811829; bh=fXnsoQjwnpZgRXM5im4681pzskBGblpLjTDxl2J7dKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kRKv4NJRmyxcm490qUIRffLYQ3LKGTXeOLIGoDDgjecIQjJKyVoTRxLk8W9wy8oLk pToZMf4FBxlbaCvNqrGoNW1moYUb591y/RLTvacFxWk2oMJOe9k6zOnsss1HzQPmPg oByUoK1qqPsZgqqRph8mXQ/jLA0hXpDdY99djuig= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Kara , Sasha Levin Subject: [PATCH 4.14 079/237] reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling Date: Thu, 27 Feb 2020 14:34:53 +0100 Message-Id: <20200227132302.923836145@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132255.285644406@linuxfoundation.org> References: <20200227132255.285644406@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 5208d85dd30c5..9caf3948417c0 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -1954,7 +1954,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