linux-stable/arch
Kumar Gala 82ae5eaffa powerpc/mm: Fix module instruction tlb fault handling on Book-E 64
We were seeing oops like the following when we did an rmmod on a module:

Unable to handle kernel paging request for instruction fetch
Faulting instruction address: 0x8000000000008010
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=2 P5020 DS
last sysfs file: /sys/devices/qman-portals.2/qman-pool.9/uevent
Modules linked in: qman_tester(-)
NIP: 8000000000008010 LR: c000000000074858 CTR: 8000000000008010
REGS: c00000002e29bab0 TRAP: 0400   Not tainted
(2.6.34.6-00744-g2d21f14)
MSR: 0000000080029000 <EE,ME,CE>  CR: 24000448  XER: 00000000
TASK = c00000007a8be600[4987] 'rmmod' THREAD: c00000002e298000 CPU: 1
GPR00: 8000000000008010 c00000002e29bd30 8000000000012798 c00000000035fb28
GPR04: 0000000000000002 0000000000000002 0000000024022428 c000000000009108
GPR08: fffffffffffffffe 800000000000a618 c0000000003c13c8 0000000000000000
GPR12: 0000000022000444 c00000000fffed00 0000000000000000 0000000000000000
GPR16: 00000000100c0000 0000000000000000 00000000100dabc8 0000000010099688
GPR20: 0000000000000000 00000000100cfc28 0000000000000000 0000000010011a44
GPR24: 00000000100017b2 0000000000000000 0000000000000000 0000000000000880
GPR28: c00000000035fb28 800000000000a7b8 c000000000376d80 c0000000003cce50
NIP [8000000000008010] .test_exit+0x0/0x10 [qman_tester]
LR [c000000000074858] .SyS_delete_module+0x1f8/0x2f0
Call Trace:
[c00000002e29bd30] [c0000000000748b4] .SyS_delete_module+0x254/0x2f0 (unreliable)
[c00000002e29be30] [c000000000000580] syscall_exit+0x0/0x2c
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
38600000 4e800020 60000000 60000000 <4e800020> 60000000 60000000 60000000
---[ end trace 4f57124939a84dc8 ]---

This appears to be due to checking the wrong permission bits in the
instruction_tlb_miss handling if the address that faulted was in vmalloc
space.  We need to look at the supervisor execute (_PAGE_BAP_SX) bit and
not the user bit (_PAGE_BAP_UX/_PAGE_EXEC).

Also removed a branch level since it did not appear to be used.

Reported-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-11-18 14:54:23 +11:00
..
alpha Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-10-28 16:16:39 -07:00
arm Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-11-15 14:06:11 -08:00
avr32 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-10-28 16:16:39 -07:00
blackfin BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
cris Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-10-28 16:16:39 -07:00
frv BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
h8300 BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
ia64 SCSI host lock push-down 2010-11-16 13:33:23 -08:00
m32r Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-10-28 16:16:39 -07:00
m68k BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
m68knommu BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
microblaze Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-10-28 16:16:39 -07:00
mips Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
mn10300 BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
parisc BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
powerpc powerpc/mm: Fix module instruction tlb fault handling on Book-E 64 2010-11-18 14:54:23 +11:00
s390 BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
score Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-10-28 16:16:39 -07:00
sh Merge branches 'sh/pio-death', 'sh/nommu', 'sh/clkfwk', 'sh/core' and 'sh/intc-extension' into sh-fixes-for-linus 2010-11-08 09:42:43 +09:00
sparc BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
tile BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
um BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
x86 BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
xtensa Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-10-28 16:16:39 -07:00
.gitignore
Kconfig jump label: Add work around to i386 gcc asm goto bug 2010-10-29 14:45:29 -04:00