Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3057999ybt; Mon, 29 Jun 2020 14:09:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDvlZhat11mnku3szFmzBrUnNOd+VkgzpKIWQ5YNec2k9+PwTDgYGfMeyesvTp7MMMGmtu X-Received: by 2002:a50:9f6a:: with SMTP id b97mr19165313edf.322.1593464997449; Mon, 29 Jun 2020 14:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593464997; cv=none; d=google.com; s=arc-20160816; b=u6vHoDpZ/TYvzJA9NOdOvWswZmek9VbfGi/zuCsCedorO8Y92zMh268OI7gAf10lu5 2f70/GATsaE6tvDJItwgJTHY2NfkXWLUwqiYaFc+kpAve32IvecbqxRPc1c3Sx4mbqo7 wCkawmHSr20uJv1haMe03qI0M5+NMOyjnav1GEoxxZjc25H7rAZrW466pPaVsoLhQg9E j8axxCyGTc8cZjXvKiRF3VbNKiSPvexQuK0kEnN1jes8AQqZyd+WJVSd7l3AFpjmnHoS 0/lSCyaUKUEm766f0DGUOmzS1MtVqCGICsjrlQx0OHQ8FibEsU9aTAPVsc32quyMYTbE 8C9Q== 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=eVCTdLmGjQhSPfqsHZF/AoVUsO0Flypwsxzziar35Ec=; b=NTRSIHJfsiWiK2gKWgOMY6Ll1PWZioeDHZWBbk/zoClpeUrd9VDBGUdyyZOHK+VKzL 9e2xft0qL3tmiuRJPywEp8aMuKom8r9e+O3KWtXO0MaL/MD4O1pg1DvOvLBBthVMb5Rc r9ZiPz2N7Zb2aTwa56E/pzByK+84VGK2tZ8KA+gifea/QkPsxUdelrAG9+gsjc5Z66tF Gzblnc2JqqJJZbPzvkXnMYpqptUH38Un0FIkYFA3RZHS8ZkHRIoHcXjNbkZJlU2lol8o MyFBFN8ne8V78H0oW6SL5AUbIqR1WBBaiQdGXEn5fG0XY/B0i8ISseu+1q2senNia5z8 p/yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1ExlE0IO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m29si521964edb.178.2020.06.29.14.09.34; Mon, 29 Jun 2020 14:09:57 -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=1ExlE0IO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390251AbgF2VHo (ORCPT + 99 others); Mon, 29 Jun 2020 17:07:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:53710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730703AbgF2TKQ (ORCPT ); Mon, 29 Jun 2020 15:10:16 -0400 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 143F5254C9; Mon, 29 Jun 2020 15:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593446022; bh=owJ+I6NGz3jpBe2GEq1rvAxlpf0k7MEWMJUWLU1jE+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1ExlE0IOQpTpJnaq9rSqTjfM82bBI63Dja8xmx4l/uUeTeIEmRecHnd/A03MgNdr9 EDnaV7DeR6w9XMVd2ACzMyBqHDe8sdfOCJ9RBAUJ+KaGilJxaTSQ+chaKZwRtBK3ka qsa60DqmsioM3/1fM6hzCpFfUQYWo/Ajaif6au4A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Josh Poimboeuf , clang-built-linux@googlegroups.com, David Teigland , Sasha Levin Subject: [PATCH 4.4 029/135] dlm: remove BUG() before panic() Date: Mon, 29 Jun 2020 11:51:23 -0400 Message-Id: <20200629155309.2495516-30-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200629155309.2495516-1-sashal@kernel.org> References: <20200629155309.2495516-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.229-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.4.229-rc1 X-KernelTest-Deadline: 2020-07-01T15:53+00:00 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: 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 5eff6ea3e27f1..63e856d90ed05 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -92,7 +92,6 @@ do { \ __LINE__, __FILE__, #x, jiffies); \ {do} \ printk("\n"); \ - BUG(); \ panic("DLM: Record message above and reboot.\n"); \ } \ } -- 2.25.1