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/s390
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
..
appldata [S390] pm: appldata power management callbacks 2009-06-16 10:31:15 +02:00
boot [PATCH] use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh 2005-06-23 09:45:07 -07:00
crypto Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 2009-03-26 16:04:22 -07:00
hypfs [S390] hypfs: Use "%u" instead of "%d" for unsigned ints in snprintf 2009-09-11 10:29:51 +02:00
include/asm [S390] fix recursive locking on page_table_lock 2009-09-11 10:29:53 +02:00
kernel [S390] kvm: use console_initcall() to initialize s390 virtio console 2009-09-11 10:29:52 +02:00
kvm Merge branch 'kvm-updates/2.6.31' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2009-08-09 14:58:21 -07:00
lib [S390] add __ucmpdi2() helper function 2009-07-07 16:37:53 +02:00
math-emu [S390] remove -traditional 2008-04-30 13:38:44 +02:00
mm [S390] fix recursive locking on page_table_lock 2009-09-11 10:29:53 +02:00
oprofile Combine instrumentation menus in kernel/Kconfig.instrumentation 2007-10-19 11:53:54 -07:00
Kconfig [S390] atomic ops: add effecient atomic64 support for 31 bit 2009-09-11 10:29:43 +02:00
Kconfig.debug generic debug pagealloc: build fix 2009-04-02 19:04:48 -07:00
Makefile [S390] hibernation: merge files and move to kernel/ 2009-09-11 10:29:45 +02:00
defconfig [S390] Update default configuration. 2009-06-22 12:08:25 +02:00