diff options
| author | Chris Fries <cfries@motorola.com> | 2014-09-28 22:58:09 -0500 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-05-02 17:20:57 +0200 |
| commit | c2d67afc6ba9cd413c1cf2d0dfd41850a5a14ebf (patch) | |
| tree | 63b5a3498a58bb178e0cb6e316649f90f0b16c41 /drivers | |
| parent | 3370901921f5d3ad71c03632212bb326277cf7aa (diff) | |
Staging: android: binder: Ratelimit binder debug messages
Ratelimit the binder debug messages, since they can get spammy and
flood the entire kernel log.
In some cases, enabling serial console with a spammy binder error can
cause a watchdog panic (and we don't have reports of this happening
with serial console disabled).
Bug: 17613664
Change-Id: Iecdb4c3c80ccf00c43459e93c17f5369fd55e6e7
Signed-off-by: Chris Fries <cfries@motorola.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/android/binder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index c35ab3e51..0ec079b90 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -69,6 +69,8 @@ #include <linux/uaccess.h> #include <linux/pid_namespace.h> #include <linux/security.h> +#include <linux/ratelimit.h> + #include <linux/spinlock.h> #include <linux/sched/rt.h> @@ -164,7 +166,7 @@ module_param_call(stop_on_user_error, binder_set_stop_on_user_error, #define binder_debug(mask, x...) \ do { \ if (binder_debug_mask & mask) \ - pr_info(x); \ + pr_info_ratelimited(x); \ } while (0) #define binder_user_error(x...) \ |
