Skip to content

Commit

Permalink
x86/apic: Fix silent & fatal merge conflict in __generic_processor_in…
Browse files Browse the repository at this point in the history
…fo()

Fix up the silent merge conflict between commit c291b01 in x86/urgent
and commit f7c2883 in x86/apic which both remove num_processors++
from the original location and then add it at two different locations. As a
result num_processors is incremented twice which can cut the number of
available cpus in half.

Remove the one which is added by commit c291b01.

In hindsight I should have merged x86/urgent into x86/apic _before_ adding
the nodeid bits, but in hindsight we are always smarter.

Reported-and-tested-by: Borislav Petkov <bp@alien8.de>
Reported-by: Mike Galbraith <umgwanakikbuti@gmail.com>
Fixes: 1e1b372 ("Merge branch 'x86/urgent' into x86/apic")
Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1609261350090.5483@nanos
Cc: Dou Liyang <douly.fnst@cn.fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Sep 26, 2016
1 parent 1e1b372 commit eb6296d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2171,8 +2171,6 @@ int __generic_processor_info(int apicid, int version, bool enabled)
return -ENOSPC;
}

num_processors++;

/*
* Validate version
*/
Expand Down

0 comments on commit eb6296d

Please sign in to comment.