From patchwork Tue Jun 23 19:56:48 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: 191583 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp1354844ecs; Tue, 23 Jun 2020 14:04:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5jKgLksMshuq99LWga027XtWG3lmam7ox6jFA2e8r0Ss3Z8Wi/IHeCJrvZo4uuow8trzU X-Received: by 2002:a17:906:b0a:: with SMTP id u10mr23129143ejg.211.1592946275351; Tue, 23 Jun 2020 14:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592946275; cv=none; d=google.com; s=arc-20160816; b=Yy3ZRZhaeosQ8uy5VBCdRrR/RGVH5cyKNlc9dS42edgGHmxwFKbb8rLIlfXO4e7poU Iwk7VdTMNtESI6mKgWpLzJx/7rvu7NmZ/CkJnpA/wXd+e8RnS+/Fi0yFRebAr1A2Ocvq 7hLxjiLD/UBoaEZtAPx0JObrxOdZX9wJVpkJz9S/8vltd8wnBCVhwcrqci4p/H+aa+Sl 3xRZu8IfmfgTnBqihOXHi6TFQf24pw4UbMfC6aVcBKiD4/Wkh54ohUhFl8+a6+Ukbb/4 eVd9GTqKXImsTgPgGEXL0bT52V/zgYizMgVgqLJ9vfV2hevTDvO8vOH+w5oDxZkBOXf5 o7QQ== 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=xBV0pylyL0t2szR6Q0WT693TU+ZzRy9KWHx6sH3NvxFUqQvJWVl2fhUsABRdjSIXY8 piT3vz1VwKjSAGBiWjwyHyo9nrZhRyC2H9zQ1ZbQGYZLwtGOGVGjqnj2iJzC2B/H0wVV JUvXDXh3/DRATr4P5RXpXB4B8OxutZaudTUNIXaFiL1/2MQigpT9gSFnjSGQJOI/Di/z R/z7kSxoCI/SxZQEtai078DgCtmCAW9ep2VBXk/L/ku8F/nfpoCh9cvJzRZeJnQ4v8++ 52ubAD3bhUrtvvSgRZneEA67S/0UNtWT2NzZeX1b/vYLRH6noxTeOcf72E4GmZo0Ne7O wd+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GUpd8rwk; 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 n15si11949302ejd.527.2020.06.23.14.04.34; Tue, 23 Jun 2020 14:04:35 -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=GUpd8rwk; 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 S2391906AbgFWVEd (ORCPT + 15 others); Tue, 23 Jun 2020 17:04:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:33198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391549AbgFWUhx (ORCPT ); Tue, 23 Jun 2020 16:37:53 -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 95B542080C; Tue, 23 Jun 2020 20:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944673; bh=DRFsV92GDkJasMMkP1EiCsfu8ldMUDEVDgx+9jRJSq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GUpd8rwkvthF+p3IAcoKpkmQzUX2zBddqQdnBIfbndXD6C6e5s5Zc4E32zKk/L4Be /cJNujD4By2A7shPZgAmCboYb7GY1MxaJLrujJF47CblJzKU+ReFp9wd2pV70Fo285 GHklqxTeJ+YXJ637jEm/FpwDTb+4oqc1uE9Socx8= 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.19 080/206] dlm: remove BUG() before panic() Date: Tue, 23 Jun 2020 21:56:48 +0200 Message-Id: <20200623195320.884128005@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195316.864547658@linuxfoundation.org> References: <20200623195316.864547658@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 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"); \ } \ }