]> git.baikalelectronics.ru Git - kernel.git/commit
s390/diag: avoid lockdep recursion
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 10 Feb 2016 13:13:24 +0000 (14:13 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 11 Feb 2016 12:05:56 +0000 (13:05 +0100)
commit83019b4b71fdcf029f145f613ed9f2a1630d83df
tree7fe708f6f676a02294012a59ef4e7c4f0dab5afc
parent17376a2c38e419d289c5b0a9255c46f6d14c6d53
s390/diag: avoid lockdep recursion

The diagnose tracer will indirectly call back into the lockdep code
when lockdep does not expect it (arch_spinlock). This causes lockdep
to disable itself and therefore we don't have a working lock
dependency validator anymore.

This patch effectively disables tracing of diag 0x9c and 0x44 if
lockdep is enabled.  If however lockdep is enabled spinlocks are
mainly implemented using a trylock variant, which will not issue any
diag 0x9c or 0x44. So this change has hardly any effect on tracing
except when arch_spinlock and friends are explicitly used.

Reported-and-Tested-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/trace.c