dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch
Martin Schwidefsky 50aa98bad0 [S390] fix recursive locking on page_table_lock
Suzuki Poulose reported the following recursive locking bug on s390:

Here is the stack trace : (see Appendix I for more info)

  [<0000000000406ed6>] _spin_lock+0x52/0x94
  [<0000000000103bde>] crst_table_free+0x14e/0x1a4
  [<00000000001ba684>] __pmd_alloc+0x114/0x1ec
  [<00000000001be8d0>] handle_mm_fault+0x2cc/0xb80
  [<0000000000407d62>] do_dat_exception+0x2b6/0x3a0
  [<0000000000114f8c>] sysc_return+0x0/0x8
  [<00000200001642b2>] 0x200001642b2

The page_table_lock is already acquired in __pmd_alloc (mm/memory.c) and
it tries to populate the pud/pgd with a new pmd allocated. If another
thread populates it before we get a chance, we free the pmd using
pmd_free().

On s390x, pmd_free(even pud_free ) is #defined to crst_table_free(),
which acquires the page_table_lock to protect the crst_table index updates.

Hence this ends up in a recursive locking of the page_table_lock.

The solution suggested by Dave Hansen is to use a new spin lock in the mmu
context to protect the access to the crst_list and the pgtable_list.

Reported-by: Suzuki Poulose <suzuki@in.ibm.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-09-11 10:29:53 +02:00
..
alpha mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
arm [ARM] Kirkwood: enable eSATA on QNAP TS-219P 2009-08-24 11:56:00 -04:00
avr32 Merge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 2009-08-24 12:26:48 -07:00
blackfin blackfin: fix wrong CTS inversion 2009-07-20 16:38:44 -07:00
cris mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
frv mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
h8300 sched: INIT_PREEMPT_COUNT 2009-07-10 14:24:05 -07:00
ia64 [IA64] fix csum_ipv6_magic() 2009-09-02 09:14:48 -07:00
m32r mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
m68k m68k,m68knommu: Wire up rt_tgsigqueueinfo and perf_counter_open 2009-08-26 23:14:50 +02:00
m68knommu m68k,m68knommu: Wire up rt_tgsigqueueinfo and perf_counter_open 2009-08-26 23:14:50 +02:00
microblaze microblaze: Update Microblaze defconfigs 2009-08-18 11:05:11 +02:00
mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2009-08-17 13:39:52 -07:00
mn10300 MN10300: includecheck fix: mn10300, pci.h 2009-08-10 08:54:27 -07:00
parisc parisc: fix warning in traps.c 2009-08-28 19:37:20 -10:00
powerpc powerpc: Fix i8259 interrupt driver kernel crash on ML510 2009-09-05 14:58:07 -07:00
s390 [S390] fix recursive locking on page_table_lock 2009-09-11 10:29:53 +02:00
sh sh: sh7724 ddr self-refresh changes 2009-08-15 12:58:50 +09:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2009-09-05 13:49:06 -07:00
um mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
x86 x86: Fix vSMP boot crash 2009-08-26 10:13:17 +02:00
xtensa mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
.gitignore
Kconfig gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00