Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1624298ybv; Fri, 21 Feb 2020 00:30:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxFin4h/l0CAGOc8diYtrUfJGP46xVGxIcByPVX3UaQc8uCyS8yZ2ZFPQ1UNttF2pdunRqG X-Received: by 2002:aca:4ece:: with SMTP id c197mr1036221oib.53.1582273827389; Fri, 21 Feb 2020 00:30:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273827; cv=none; d=google.com; s=arc-20160816; b=tsj+43JHIGoi4G//fxPLdoVMZgosLoQAL97Ga4gUidMQW8dsV1rLnjYZQJWAK6JQ1a TDyJw5JWHTT74e5+Z4oBEgyAWWgXkT/bke3+qPfI35TFmfIxf1dveZnvX7Pklg8YlSuN 2ECkMRmUOLbuhDdfCAJwsQ0rKBRatBruNst2l/wTAl3UTHwdABjSfeqPAOBgMczBk1oe o/kqz4z2CkNuOpGJ8AGR3eg+QPRn8sd0OZZqdECdRbQQmvkKzcDnejf1XHcdaY3ImLYG gZNlyry+Y9W8kKCsIO2HohPRcrKvRSP3Y72AuPlkGfp85cFOOrR+0OE9tGZITq81koSq dSRg== 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=ERAkCkR1+r5Yg29URur7ZznQaKCeyBveRx5JegP29j4=; b=HwoXnuuo0TFduW3jDLRqgb1Y8XhYpavQO5OhoUCZpvwLs6xZYW82BIg0zUPCbHMTMm 5GhNISaWWd7LcF9U8aoT6oi/QBI6c2lpMUIqi7VODPc69qRu8K5lBuQi3aeoe+z/oY3r WAMJyuOm6DWQe/jj+GsQT5DQaLYsjz8exywRBm18l3XQvDzo61ay+c7ZBTGfjRAr10Sn 10/Xpp19erNT26u/6/yFTh8I05sGJbCkDfZ+RxnANSEoCGP6mIUZcbwlkYHPnKgl2Qs/ 49OKfnP/gjnirqJy1UvCGLUs4/g3wTSx3+0254lCR7ZyjjRrF3QTT1xS/C7f2ULXihDe AVyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ql3abFVn; 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 w20si475486oic.103.2020.02.21.00.30.15; Fri, 21 Feb 2020 00:30:27 -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=Ql3abFVn; 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 S2388018AbgBUIT3 (ORCPT + 99 others); Fri, 21 Feb 2020 03:19:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:57916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387996AbgBUITY (ORCPT ); Fri, 21 Feb 2020 03:19:24 -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 890FF24689; Fri, 21 Feb 2020 08:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273164; bh=VjGmQW4ZaEIwBplxGXhjzp+VjZggaABay/iw0AmQNss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ql3abFVnq4geFTUDsGf1lHmLGf5lQV5DyJ+lKSrVyg8cRZQYdCE/qHWNdcEZ7Vw8f eRpnD+1O+rtO5Qk1EXfvWZYIZ0K7lG/rtSaj0PgZFbO7tl4yPfmt5g41EzTYjrK7vi sgGfx9nLqoLU2t89HrSbUKYRDYMywaiBOpjciVAo= 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.19 069/191] reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling Date: Fri, 21 Feb 2020 08:40:42 +0100 Message-Id: <20200221072259.649320230@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 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 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 6280efeceb0a2..de5eda33c92a0 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 -- 2.20.1