diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-03 21:31:37 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-03 21:31:37 +0200 |
commit | 2bece1a0106497d065fb7db77abc525d32d3bf04 (patch) | |
tree | d48089056e680afc6c68cbe46c095a82f27e8f86 /arch | |
parent | Merge tag 'char-misc-4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | arm64: kernel: Fix unmasked debug exceptions when restoring mdscr_el1 (diff) | |
download | linux-2bece1a0106497d065fb7db77abc525d32d3bf04.tar.xz linux-2bece1a0106497d065fb7db77abc525d32d3bf04.zip |
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas:
"arm64 and arm/perf fixes:
- arm64 fix: debug exception unmasking on the CPU resume path
- ARM PMU fixes: memory leak on error path and NULL pointer
dereference"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: kernel: Fix unmasked debug exceptions when restoring mdscr_el1
drivers/perf: arm_pmu: Fix NULL pointer dereference during probe
drivers/perf: arm_pmu: Fix leak in error path
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/mm/proc.S | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 5bb61de23201..9d37e967fa19 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -100,7 +100,16 @@ ENTRY(cpu_do_resume) msr tcr_el1, x8 msr vbar_el1, x9 + + /* + * __cpu_setup() cleared MDSCR_EL1.MDE and friends, before unmasking + * debug exceptions. By restoring MDSCR_EL1 here, we may take a debug + * exception. Mask them until local_dbg_restore() in cpu_suspend() + * resets them. + */ + disable_dbg msr mdscr_el1, x10 + msr sctlr_el1, x12 /* * Restore oslsr_el1 by writing oslar_el1 |