arm64: traps: disable irq in die()
authorQiao Zhou <qiaozhou@asrmicro.com>
Fri, 7 Jul 2017 09:29:34 +0000 (17:29 +0800)
committerWill Deacon <will.deacon@arm.com>
Thu, 20 Jul 2017 09:21:06 +0000 (10:21 +0100)
commit6f44a0bacb79a03972c83759711832b382b1b8ac
tree1b27e981920b688e44df86722d3903e6e93cdc5b
parent32fb5d73c98b079e7c815b62e9d88a39ff8ce509
arm64: traps: disable irq in die()

In current die(), the irq is disabled for __die() handle, not
including the possible panic() handling. Since the log in __die()
can take several hundreds ms, new irq might come and interrupt
current die().

If the process calling die() holds some critical resource, and some
other process scheduled later also needs it, then it would deadlock.
The first panic will not be executed.

So here disable irq for the whole flow of die().

Signed-off-by: Qiao Zhou <qiaozhou@asrmicro.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/traps.c