linux/arch
Frederic Weisbecker d6c304055b x86, msr: Remove the bkl from msr_open()
Remove the big kernel lock from msr_open() as it doesn't protect
anything there.

The only racy event that can happen here is a concurrent cpu shutdown.

So let's look at what could be racy during/after the above event:

- The cpu_online() check is racy, but the bkl doesn't help about
  that anyway it disables preemption but we may be chcking another
  cpu than the current one.
  Also the cpu can still become offlined between open and read calls.

- The cpu_data(cpu) returns a safe pointer too. It won't be released on
  cpu offlining. But some fields can be changed from
  arch/x86/kernel/smpboot.c:remove_siblinginfo() :

	- phys_proc_id
	- cpu_core_id

  Those are not read from msr_open(). What we are checking is the
  x86_capability that is left untouched on offlining.

So this removal looks safe.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: John Kacur <jkacur@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Sven-Thorsten Dietrich <sdietrich@suse.de>
LKML-Reference: <1254944602-7382-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-10-07 13:47:19 -07:00
..
alpha KEYS: Add missing linux/tracehook.h #inclusions 2009-09-09 18:30:02 +10:00
arm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2009-09-11 09:19:35 -07:00
avr32 Merge branch 'next' into for-linus 2009-09-11 08:04:49 +10:00
blackfin blackfin: fix wrong CTS inversion 2009-07-20 16:38:44 -07:00
cris KEYS: Add missing linux/tracehook.h #inclusions 2009-09-09 18:30:02 +10:00
frv KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] 2009-09-02 21:29:22 +10:00
h8300 KEYS: Add missing linux/tracehook.h #inclusions 2009-09-09 18:30:02 +10:00
ia64 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-11 13:20:18 -07:00
m32r KEYS: Add missing linux/tracehook.h #inclusions 2009-09-09 18:30:02 +10:00
m68k locking, m68k/asm-offsets: Rename signal defines 2009-09-01 09:38:03 +02:00
m68knommu m68k,m68knommu: Wire up rt_tgsigqueueinfo and perf_counter_open 2009-08-26 23:14:50 +02:00
microblaze microblaze: Update Microblaze defconfigs 2009-08-18 11:05:11 +02:00
mips KEYS: Add missing linux/tracehook.h #inclusions 2009-09-09 18:30:02 +10:00
mn10300 KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] 2009-09-02 21:29:22 +10:00
parisc Merge branch 'next' into for-linus 2009-09-11 08:04:49 +10:00
powerpc Merge branch 'perfcounters-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-11 13:22:43 -07:00
s390 Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-11 13:24:03 -07:00
sh KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] 2009-09-02 21:29:22 +10:00
sparc Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-11 13:17:24 -07:00
um mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
x86 x86, msr: Remove the bkl from msr_open() 2009-10-07 13:47:19 -07:00
xtensa mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
.gitignore
Kconfig oprofile: Implement performance counter multiplexing 2009-07-20 16:33:53 +02:00