From: Krzysztof Opasiak Date: Wed, 5 Jul 2017 17:24:44 +0000 (+0200) Subject: android: binder: Use dedicated helper to access rlimit value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c3643b699fa22178dca307e4aca077ca338616cd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git android: binder: Use dedicated helper to access rlimit value Use rlimit() helper instead of manually writing whole chain from current task to rlim_cur Signed-off-by: Krzysztof Opasiak Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/android/binder.c b/drivers/android/binder.c index c8e9d5dfcd86..fdbde8ce5804 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -930,7 +930,7 @@ static void binder_set_nice(long nice) set_user_nice(current, nice); return; } - min_nice = rlimit_to_nice(current->signal->rlim[RLIMIT_NICE].rlim_cur); + min_nice = rlimit_to_nice(rlimit(RLIMIT_NICE)); binder_debug(BINDER_DEBUG_PRIORITY_CAP, "%d: nice value %ld not allowed use %ld instead\n", current->pid, nice, min_nice);