lkml.org 
[lkml]   [2017]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT pull] smp/hotplug updates for 4.13
On Sun, 9 Jul 2017, Linus Torvalds wrote:
> On Sun, Jul 9, 2017 at 2:07 AM, Thomas Gleixner <tglx@linutronix.de> 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

\
 
 \ /
  Last update: 2017-07-11 08:09    [W:0.049 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site