Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp6540ybt; Tue, 23 Jun 2020 13:49:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLfAdqHPULWzezfd3VkCWKPOFmq+QSAC1WXkKM9LB08v7/c3QJHyeVUjcPrJlinY5JEnqM X-Received: by 2002:a17:907:72ca:: with SMTP id du10mr21702064ejc.78.1592945377986; Tue, 23 Jun 2020 13:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592945377; cv=none; d=google.com; s=arc-20160816; b=uP/A8nDaX4jhcZoC3UhNlFJZeLfYqM1Desx5wtD+exl66tmToVg+r+Ga7ZG9hH1i9c f5yKOo5ug6/KJJ20QvPWbYxq9rXau9FVtNLYsP4lSq+Wl9KlYnCz37zYe/c/hg2v3VAC eoeXgP7BpnOv1aXWBcnM5PYHvvCGg8an3esdfmM4tc9cbB87QQvDW7eyZMLXgNLVMrlk PCgWOvlzYKfChNIa96ABk/5UwOJoI+6QJeLag2deEN4t5Mkp+l5BDP4EhsQK1MK6BToD Rg1kh9XqEbScdMiREF2j1hBWDmbpJza4RevlQIN0D7jQnsimZIMDRRHgenNHiH/zlwF/ d33A== 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=9hnzVE6GuKVYpftQ20I/sHVzYWR+qtdpnOODqp+CYlk=; b=Ayne2PEtcKoLenZOoCtz1E/oQJAdf+CJ86eAqx2EvRo0NVrDMQ+oJV56Ye34S7iwmH LvEUYqnLZBdDy0EE3pai4+CU2F4fFnC9/AkckuZJJaMTlvHoy4hecC9kdIeyVK1CRtoc ds0cVyCtb9oSw+5lUBoEISZtj0xLTgm89MaJCJ0kwgomXtUUzZ/0H+ZMTMrSY74Kg72g AyBKkfq9V6cmmIAGCdHKN/DY+PwbQsTBOQPjHzJ9CXl43tM7jcNYLZ4TQfJ5U8JXFo2t m1McxOxzWdQCOU2GEQPK2xfPzDsGBWiA29QgMH1mAL66GMBmy7tB2vX8jJHczTI2jNn+ H0XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vAk4yWbu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 si29si11471488ejb.40.2020.06.23.13.49.09; Tue, 23 Jun 2020 13:49:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=vAk4yWbu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392774AbgFWUps (ORCPT + 99 others); Tue, 23 Jun 2020 16:45:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:43150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390937AbgFWUpg (ORCPT ); Tue, 23 Jun 2020 16:45:36 -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 2B21520836; Tue, 23 Jun 2020 20:45:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592945136; bh=DRFsV92GDkJasMMkP1EiCsfu8ldMUDEVDgx+9jRJSq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vAk4yWbubVfYRMObBPE7pvSJHHSmh2+hfvLdX4jYWmLfsSd9bY7S4+ZuBN5RP1rqK gEfjF3R5YHlMMjMJ9gFf4UrCtGZcNF5yGCAZZkc9gHVeQa3eqmUmhFoV1hUOQmUu5t 5l15eaA8bfJGLYP2dvkJbfh+Z8lXDtZ6fccjOVr4= 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 4.14 053/136] dlm: remove BUG() before panic() Date: Tue, 23 Jun 2020 21:58:29 +0200 Message-Id: <20200623195306.347715455@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195303.601828702@linuxfoundation.org> References: <20200623195303.601828702@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: 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(-) diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index 748e8d59e6111..cb287df13a7aa 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -99,7 +99,6 @@ do { \ __LINE__, __FILE__, #x, jiffies); \ {do} \ printk("\n"); \ - BUG(); \ panic("DLM: Record message above and reboot.\n"); \ } \ } -- 2.25.1