linux_dsm_epyc7002/arch/parisc/kernel
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
..
.gitignore parisc: add arch/parisc/kernel/.gitignore 2008-10-10 16:32:28 +00:00
asm-offsets.c parisc: Use of align_frame provides stack frame. 2010-05-30 05:38:27 -04:00
binfmt_elf32.c [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
cache.c parisc: remove trailing space in messages 2010-03-06 22:54:09 +00:00
drivers.c parisc: add uevent helper for parisc bus 2009-01-05 19:11:59 +00:00
entry.S parisc: Remove unnecessary macros from entry.S 2010-05-30 05:47:28 -04:00
firmware.c parisc: pass through '\t' to early (iodc) console 2010-08-04 11:17:10 -07:00
ftrace.c sched_clock: Add local_clock() API and improve documentation 2010-06-09 10:34:49 +02:00
hardware.c [PARISC] add back Crestone Peak cpu 2008-03-15 19:12:19 -07:00
head.S Rename .data.read_mostly to .data..read_mostly. 2010-03-03 11:26:00 +01:00
hpmc.S parisc: export length of os_hpmc vector 2009-01-05 19:18:27 +00:00
init_task.c Rename .data.vmpages and .data.vm0.XXX to .data..vmpages and .data..vm0.XXX. 2010-03-03 11:26:00 +01:00
inventory.c parisc: inventory.c, fix bloated stack frame 2009-07-03 03:34:11 +00:00
irq.c parisc: Fixup last users of irq_chip->typename 2009-12-16 03:48:56 +00:00
Makefile parisc: add ftrace (function and graph tracer) functionality 2009-03-31 02:51:34 +00:00
module.c modules: Fix module_bug_list list corruption race 2010-10-05 11:29:27 -07:00
pa7300lc.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pacache.S Revert "parisc: fix trivial section name warnings" 2008-06-13 10:49:45 -04:00
parisc_ksyms.c parisc: add ftrace (function and graph tracer) functionality 2009-03-31 02:51:34 +00:00
pci-dma.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pci.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pdc_chassis.c [PARISC] Work around machines which do not support chassis warnings 2006-06-27 23:28:37 +00:00
pdc_cons.c parisc: Use DEFINE_SPINLOCK 2009-01-05 19:13:18 +00:00
perf_asm.S Revert "parisc: fix trivial section name warnings" 2008-06-13 10:49:45 -04:00
perf_images.h [PARISC] Use kzalloc and other janitor-style cleanups 2006-01-22 20:26:31 -05:00
perf.c tree-wide: fix a very frequent spelling mistake 2009-11-09 09:40:54 +01:00
process.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
processor.c parisc: processor.c, fix bloated stack frame 2009-07-03 03:34:11 +00:00
ptrace.c parisc: stop using task->ptrace for {single,block}step flags 2009-09-27 23:07:22 -04:00
real2.S parisc: move pdc_result to real2.S 2008-10-10 16:32:28 +00:00
setup.c parisc: remove CVS keywords 2009-07-03 03:34:06 +00:00
signal32.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
signal32.h [PARISC] spelling fixes: arch/parisc/ 2007-05-22 22:52:16 -04:00
signal.c parisc: fix tracing of signals 2010-02-12 08:51:58 -08:00
smp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
stacktrace.c parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT 2009-03-31 02:51:34 +00:00
sys32.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_parisc32.c Merge branch 'for-2.6.33' of git://linux-nfs.org/~bfields/linux 2009-12-16 10:43:34 -08:00
sys_parisc.c improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
syscall_table.S improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
syscall.S parisc: LWS fixes for syscall.S 2010-05-30 05:46:37 -04:00
time.c parisc: Convert to read/update_persistent_clock 2010-03-06 22:54:10 +00:00
topology.c parisc: Replace NR_CPUS in parisc code 2009-01-05 19:09:02 +00:00
traps.c parisc: fix warning in traps.c 2009-08-28 19:37:20 -10:00
unaligned.c parisc: use __ratelimit in unaligned.c 2010-03-06 22:54:59 +00:00
unwind.c parisc: use sort() instead of home-made implementation (v2) 2009-12-16 03:48:55 +00:00
vmlinux.lds.S Rename .data.lock_aligned to .data..lock_aligned. 2010-03-03 11:26:01 +01:00