From patchwork Tue Jun 23 19:55:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 191592 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp1362248ecs; Tue, 23 Jun 2020 14:16:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT7wxOZTYCSO8jT/VZks//BDiC83bnrMH1dgSkQZnxA/oegLdpS6+AqI2Qea3dtFfIOncw X-Received: by 2002:aa7:c2d3:: with SMTP id m19mr23276812edp.382.1592946968019; Tue, 23 Jun 2020 14:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592946968; cv=none; d=google.com; s=arc-20160816; b=jj+w+XuPfW9uHbBJhmhSPR8q9lmkbBmf1dLBPEbi1X48qBU9kDxhFKh0iYYWUNuZiS PPuXSSKqnelKXMSHvTl2aQKnb0s+UBDDEdaaY9aBk+oWeYjovY81rUjefWpRCJAPRtzX 3T1q6ZX3W0Ijz2tMxpQwIFW5Sfl8v6JnwQ0PwoYCSiJ00NIqF4UT+U58CBVKDDMJKEtG FbRqdCfTvVbT2UemaEjAUwavRhsnT9useyz48nyJWM4Oe8jOE0gQpHto6mC+oa5wm0I4 sT5JF4kPQrIGhts8T4fsNznt6UX4/I7lw6nDMjpqlIgL+GnIL0EXRN4CiV+MfA8W4oCb NX7w== 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=KtbdENe9dsg+/L7uD2FVPjZHkW2NBrwy9YLriDlTEBc=; b=PjfCmDB2ZlTCR0EQJBjc6tGBLMsQHMJe1NiZPPMzDCnzjoZO9m5JzZWhf6LzkIIrQv F9GF13MUgqB6Ep3gtiU7S1YjMcrsEtPHHIKqO0z65WaDmnvwN0bk8t9RZkT+4PmvE9EI lPPRhIrlVuv1Fu9RSzO5mt99NQpEdeUZcoSpkdmV/UCG2/sjug5IO/bCFMioiSu1cKH2 N5i0VpZ5zRdzPNEhBKtSMMXpUxY1fthaSeKVFtuA8F3ZrIcXWmyz+POLszqQQeFHacv5 X+2zUJS8FrUQB7gD5iOpInx7R06804HJWBBNxAojOxvcNtNaawOWxelb86vENHw/J5Uo rZEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YLwigC3s; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b27si11695775ejq.568.2020.06.23.14.16.07; Tue, 23 Jun 2020 14:16:08 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YLwigC3s; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390840AbgFWU2G (ORCPT + 15 others); Tue, 23 Jun 2020 16:28:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:47778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390828AbgFWU2F (ORCPT ); Tue, 23 Jun 2020 16:28:05 -0400 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 35B632064B; Tue, 23 Jun 2020 20:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944084; bh=soDd+QyUzhwN2rtXSi47bYrnlf+mZDpo7wt+h1PlRxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YLwigC3s01vRbbiBu+T0b/nAMWzDH1G/FIxWDghdsMpMnLhiLDfO3jqnDlKVREdWL JLR/p9yGrKIUMFLdI5fODWmCXXkEIUL9RkyMkcHcFrjDuj6qjGpkESv8H4yXyS4DC8 j9LK56AoHwe8PauqOs/CmaCBXYWPS/B6K/icwi2Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Josh Poimboeuf , clang-built-linux@googlegroups.com, Arnd Bergmann , David Teigland , Sasha Levin Subject: [PATCH 5.4 136/314] dlm: remove BUG() before panic() Date: Tue, 23 Jun 2020 21:55:31 +0200 Message-Id: <20200623195345.356721585@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195338.770401005@linuxfoundation.org> References: <20200623195338.770401005@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: Arnd Bergmann [ Upstream commit fe204591cc9480347af7d2d6029b24a62e449486 ] Building a kernel with clang sometimes fails with an objtool error in dlm: fs/dlm/lock.o: warning: objtool: revert_lock_pc()+0xbd: can't find jump dest instruction at .text+0xd7fc The problem is that BUG() never returns and the compiler knows that anything after it is unreachable, however the panic still emits some code that does not get fully eliminated. Having both BUG() and panic() is really pointless as the BUG() kills the current process and the subsequent panic() never hits. In most cases, we probably don't really want either and should replace the DLM_ASSERT() statements with WARN_ON(), as has been done for some of them. Remove the BUG() here so the user at least sees the panic message and we can reliably build randconfig kernels. Fixes: e7fd41792fc0 ("[DLM] The core of the DLM for GFS2/CLVM") Cc: Josh Poimboeuf Cc: clang-built-linux@googlegroups.com Signed-off-by: Arnd Bergmann Signed-off-by: David Teigland Signed-off-by: Sasha Levin --- fs/dlm/dlm_internal.h | 1 - 1 file changed, 1 deletion(-) -- 2.25.1 diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index 416d9de356791..4311d01b02a8b 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -97,7 +97,6 @@ do { \ __LINE__, __FILE__, #x, jiffies); \ {do} \ printk("\n"); \ - BUG(); \ panic("DLM: Record message above and reboot.\n"); \ } \ }