1
0
Fork 0
alistair23-linux/include
Trent Piepho 5e37661389 [PATCH] symbol_put_addr() locks kernel
Even since a previous patch:

Fix race between CONFIG_DEBUG_SLABALLOC and modules
Sun, 27 Jun 2004 17:55:19 +0000 (17:55 +0000)
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commit;h=92b3db26d31cf21b70e3c1eadc56c179506d8fbe

The function symbol_put_addr() will deadlock the kernel.

symbol_put_addr() would acquire modlist_lock, then while holding the lock call
two functions kernel_text_address() and module_text_address() which also try
to acquire the same lock.  This deadlocks the kernel of course.

This patch changes symbol_put_addr() to not acquire the modlist_lock, it
doesn't need it since it never looks at the module list directly.  Also, it
now uses core_kernel_text() instead of kernel_text_address().  The latter has
an additional check for addr inside a module, but we don't need to do that
since we call module_text_address() (the same function kernel_text_address
uses) ourselves.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Cc: Zwane Mwaikambo <zwane@fsmlabs.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:55 -07:00
..
acpi [PATCH] s/;;/;/g 2006-03-24 07:33:24 -08:00
asm-alpha [PATCH] Configurable NODES_SHIFT 2006-04-11 06:18:39 -07:00
asm-arm [ARM] 3506/1: aaec2000: debug-macro.S needs hardware.h 2006-05-07 22:49:23 +01:00
asm-arm26 [PATCH] unify pfn_to_page: arm26 pfn_to_page 2006-03-27 08:44:44 -08:00
asm-cris [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-frv [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-generic [PATCH] mutex: some cleanups 2006-03-31 12:19:01 -08:00
asm-h8300 [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-i386 [PATCH] x86_64: avoid IRQ0 ioapic pin collision 2006-05-08 09:34:56 -07:00
asm-ia64 [IA64] remove asm-ia64/bitops.h self-inclusion 2006-05-05 11:37:15 -07:00
asm-m32r [PATCH] m32r: update switch_to macro for tuning 2006-04-19 09:13:51 -07:00
asm-m68k [PATCH] m68k: fix undefined reference to generic_find_next_zero_le_bit 2006-03-26 08:57:13 -08:00
asm-m68knommu [PATCH] bitops: m68knommu: use generic bitops 2006-03-26 08:57:13 -08:00
asm-mips [MIPS] 24K LV: Add core card id. 2006-04-27 15:13:50 +01:00
asm-parisc [PARISC] Make ioremap default to _nocache 2006-04-21 22:20:35 +00:00
asm-powerpc powerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses 2006-05-03 23:06:46 +10:00
asm-ppc powerpc/32: Define an is_kernel_addr() to fix ARCH=ppc compilation 2006-05-09 16:00:59 +10:00
asm-s390 [PATCH] s390: add vmsplice system call 2006-05-15 11:20:55 -07:00
asm-sh [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-sh64 [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-sparc [SPARC]: Hook up vmsplice into syscall tables. 2006-05-03 13:55:46 -07:00
asm-sparc64 [SPARC]: Hook up vmsplice into syscall tables. 2006-05-03 13:55:46 -07:00
asm-um [PATCH] uml: fix "extern-vs-static" proto conflict in TLS code 2006-04-11 06:18:36 -07:00
asm-v850 [PATCH] Remove unused prepare_to_switch macro 2006-04-11 06:18:34 -07:00
asm-x86_64 [PATCH] x86_64: Avoid EBDA area in early boot allocator 2006-05-08 09:34:56 -07:00
asm-xtensa [PATCH] request_irq(): remove warnings from irq probing 2006-04-28 08:33:46 -07:00
keys [PATCH] Keys: Remove key duplication 2006-01-06 08:33:29 -08:00
linux [PATCH] symbol_put_addr() locks kernel 2006-05-15 11:20:55 -07:00
math-emu
media V4L/DVB (3702): Make msp3400 routing defines more consistent 2006-04-02 04:56:11 -03:00
mtd
net [NEIGH]: Fix IP-over-ATM and ARP interaction. 2006-05-12 14:56:08 -07:00
pcmcia [PATCH] pcmcia: declare pccard_iodyn_ops (fix m8xx_pcmcia.c compilation error) 2006-03-31 21:49:51 +02:00
rdma IB: simplify static rate encoding 2006-04-10 09:43:47 -07:00
rxrpc
scsi [SCSI] srp.h: avoid padding of structs 2006-04-28 10:14:15 -05:00
sound [ALSA] Fix Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n 2006-04-27 21:10:42 +02:00
video [PATCH] Remove MODULE_PARM 2006-03-25 08:22:52 -08:00