powerpc: Rate-limit users spamming kernel log buffer
authorMichael Neuling <mikey@neuling.org>
Fri, 14 Mar 2014 06:03:58 +0000 (17:03 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 23 Mar 2014 22:48:34 +0000 (09:48 +1100)
commitee4ed6fa5af0009a1205498d1f754fecc7af7657
tree5eaa6e13a2d83e39bb66fe74585328dd7edd02c4
parente9aaac1ac39f58a897e9b71e153317c8c216cb21
powerpc: Rate-limit users spamming kernel log buffer

The facility unavailable exception can be triggered from userspace by
accessing PMU registers when EBB is not enabled.  This causes the
included pr_err() to run, hence spamming the kernel log buffer.

This avoids this by rate limiting these messages.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/traps.c