From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755300AbdGKGJT (ORCPT ); Tue, 11 Jul 2017 02:09:19 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:41395 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213AbdGKGJS (ORCPT ); Tue, 11 Jul 2017 02:09:18 -0400 Date: Tue, 11 Jul 2017 08:09:16 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: LKML , Andrew Morton , Ingo Molnar , "H. Peter Anvin" Subject: Re: [GIT pull] smp/hotplug updates for 4.13 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 9 Jul 2017, Linus Torvalds wrote: > On Sun, Jul 9, 2017 at 2:07 AM, Thomas Gleixner wrote: > > > > + /* Wait for the CPU to reach CPUHP_AP_ONLINE_IDLE */ > > wait_for_completion(&st->done); > > + BUG_ON(!cpu_online(cpu)); > > I realize this isn't actually a new BUG_ON(), just a moved one, but > can we *please* just agree to get rid of these machine-killing > idiocies? > > The fact that it would be a bug if this triggers doesn't excuse it one > whit. BUG_ON() is simply bad. > > Either it's a "this cannot happen", in which case it should be > deleted, or it's a "if this ever happens, we really should notice it", > in which case it should probably be a > > if (WARN_ON)ONCE(..)) > return -EBUSY; > > or something. > > That routine very much has an existing error path for failure to bring > up a CPU, dammit! > > THERE IS NO EXCUSE FOR KILLING THE MACHINE THERE! Agreed. I noticed when I moved the code, but then forgot. Will queue a fix. Thanks, tglx