linux-kernel-test/arch/x86
Linus Torvalds 5336377d62 modules: Fix module_bug_list list corruption race
With all the recent module loading cleanups, we've minimized the code
that sits under module_mutex, fixing various deadlocks and making it
possible to do most of the module loading in parallel.

However, that whole conversion totally missed the rather obscure code
that adds a new module to the list for BUG() handling.  That code was
doubly obscure because (a) the code itself lives in lib/bugs.c (for
dubious reasons) and (b) it gets called from the architecture-specific
"module_finalize()" rather than from generic code.

Calling it from arch-specific code makes no sense what-so-ever to begin
with, and is now actively wrong since that code isn't protected by the
module loading lock any more.

So this commit moves the "module_bug_{finalize,cleanup}()" calls away
from the arch-specific code, and into the generic code - and in the
process protects it with the module_mutex so that the list operations
are now safe.

Future fixups:
 - move the module list handling code into kernel/module.c where it
   belongs.
 - get rid of 'module_bug_list' and just use the regular list of modules
   (called 'modules' - imagine that) that we already create and maintain
   for other reasons.

Reported-and-tested-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-05 11:29:27 -07:00
..
boot x86, setup: Fix earlyprintk=serial,0x3f8,115200 2010-09-21 10:18:33 -07:00
configs defconfig reduction 2010-08-14 22:26:53 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-03 11:28:58 +08:00
ia32 x86-64, compat: Retruncate rax after ia32 syscall entry tracing 2010-09-14 16:08:47 -07:00
include/asm Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-09-27 21:19:27 -07:00
kernel modules: Fix module_bug_list list corruption race 2010-10-05 11:29:27 -07:00
kvm KVM: i8259: fix migration 2010-09-08 14:50:58 -03:00
lguest lguest: update comments to reflect LHCALL_LOAD_GDT_ENTRY. 2010-09-21 10:54:02 +09:30
lib Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-08-13 10:35:48 -07:00
math-emu x86, fpu: Unbreak FPU emulation 2010-05-10 13:37:16 -07:00
mm x86: Fix the address space annotations of iomap_atomic_prot_pfn() 2010-09-05 14:26:14 +02:00
oprofile oprofile: Add Support for Intel CPU Family 6 / Model 22 (Intel Celeron 540) 2010-09-16 12:35:56 +02:00
pci x86/PCI: use for_each_pci_dev() 2010-07-30 09:47:33 -07:00
power x86, tsc, sched: Recompute cyc2ns_offset's during resume from sleep states 2010-08-20 14:59:02 +02:00
tools x86: Remove trailing spaces in messages 2010-02-07 17:47:51 +01:00
vdso Merge branches 'x86-cleanups-for-linus', 'x86-vmware-for-linus', 'x86-mtrr-for-linus', 'x86-apic-for-linus', 'x86-fpu-for-linus' and 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-08-06 16:22:59 -07:00
video
xen xen: pvhvm: rename xen_emul_unplug=ignore to =unnnecessary 2010-08-23 11:59:29 +01:00
.gitignore add random binaries to .gitignore 2010-04-08 11:34:34 +02:00
Kbuild
Kconfig Replace Configure with Enable in description of MAXSMP 2010-08-21 12:38:58 -07:00
Kconfig.cpu Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:58:16 -07:00
Kconfig.debug Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:40:21 -07:00
Makefile x86, build: Disable -fPIE when compiling with CONFIG_CC_STACKPROTECTOR=y 2010-09-13 15:53:16 -07:00
Makefile_32.cpu