arm64: force_signal_inject: WARN if called from kernel context
authorWill Deacon <will.deacon@arm.com>
Tue, 14 Aug 2018 15:24:54 +0000 (16:24 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 14 Sep 2018 16:46:24 +0000 (17:46 +0100)
commit8a60419d36762a1131c2b29f7bd14371db4df1b5
tree26d51ae49c742f5e1d83eae8487009f270ac3896
parentb8925ee2e12d1cb9a11d6f28b5814f2bfa59dce1
arm64: force_signal_inject: WARN if called from kernel context

force_signal_inject() is designed to send a fatal signal to userspace,
so WARN if the current pt_regs indicates a kernel context. This can
currently happen for the undefined instruction trap, so patch that up so
we always BUG() if we didn't have a handler.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/traps.c