summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/traps.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2018-02-20 15:08:51 +0000
committerWill Deacon <will.deacon@arm.com>2018-03-06 18:52:31 +0000
commita26731d9d1e3fa93db0b5781d7e8dd9dbff1313e (patch)
tree375d92e3c830c7024a5a3d4c3d2a3492c150e30e /arch/arm64/kernel/traps.c
parentf71016a8a8c5696530ec7173ee969c68e91d3719 (diff)
arm64: Move show_unhandled_signals_ratelimited into traps.c
show_unhandled_signals_ratelimited is only called in traps.c, so move it out of its macro in the dreaded system_misc.h and into a static function in traps.c Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/traps.c')
-rw-r--r--arch/arm64/kernel/traps.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index 835411cab38c..b139fe2d2126 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -223,6 +223,13 @@ void die(const char *str, struct pt_regs *regs, int err)
do_exit(SIGSEGV);
}
+static bool show_unhandled_signals_ratelimited(void)
+{
+ static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
+ DEFAULT_RATELIMIT_BURST);
+ return show_unhandled_signals && __ratelimit(&rs);
+}
+
void arm64_force_sig_info(struct siginfo *info, const char *str,
struct task_struct *tsk)
{