linux/arch
Mika Westerberg 4e54d93d3c ARM: 6464/2: fix spinlock recursion in adjust_pte()
When running following code in a machine which has VIVT caches and
USE_SPLIT_PTLOCKS is not defined:

  fd = open("/etc/passwd", O_RDONLY);
  addr = mmap(NULL, 4096, PROT_READ, MAP_SHARED, fd, 0);
  addr2 = mmap(NULL, 4096, PROT_READ, MAP_SHARED, fd, 0);

  v = *((int *)addr);

we will hang in spinlock recursion in the page fault handler:

  BUG: spinlock recursion on CPU#0, mmap_test/717
  lock: c5e295d8, .magic: dead4ead, .owner: mmap_test/717,
                  .owner_cpu: 0
  [<c0026604>] (unwind_backtrace+0x0/0xec)
  [<c014ee48>] (do_raw_spin_lock+0x40/0x140)
  [<c0027f68>] (update_mmu_cache+0x208/0x250)
  [<c0079db4>] (__do_fault+0x320/0x3ec)
  [<c007af7c>] (handle_mm_fault+0x2f0/0x6d8)
  [<c0027834>] (do_page_fault+0xdc/0x1cc)
  [<c00202d0>] (do_DataAbort+0x34/0x94)

This comes from the fact that when USE_SPLIT_PTLOCKS is not defined,
the only lock protecting the page tables is mm->page_table_lock
which is already locked before update_mmu_cache() is called.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-10-28 13:53:47 +01:00
..
alpha alpha: use single HAE window on T2 core logic (gamma, sable) 2010-10-26 16:52:12 -07:00
arm ARM: 6464/2: fix spinlock recursion in adjust_pte() 2010-10-28 13:53:47 +01:00
avr32 mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
blackfin m68k{nommu}/blackfin : remove old assembler-only flags bit definitions 2010-10-26 16:52:12 -07:00
cris mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
frv mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
h8300 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
ia64 mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
m32r mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
m68k m68k{nommu}/blackfin : remove old assembler-only flags bit definitions 2010-10-26 16:52:12 -07:00
m68knommu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2010-10-25 07:44:27 -07:00
microblaze mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
mips mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
mn10300 mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
parisc mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
powerpc replace nested max/min macros with {max,min}3 macro 2010-10-26 16:52:12 -07:00
s390 mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
score mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
sh mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
sparc mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
tile Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2010-10-26 17:25:38 -07:00
um um: migrate from __do_IRQ() to generic_handle_irq() 2010-10-26 16:52:12 -07:00
x86 Merge branches 'upstream/xenfs' and 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen 2010-10-26 18:20:19 -07:00
xtensa mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
.gitignore
Kconfig Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core 2010-09-24 09:12:05 +02:00