Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbdGERZN (ORCPT ); Wed, 5 Jul 2017 13:25:13 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:14402 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751826AbdGERZL (ORCPT ); Wed, 5 Jul 2017 13:25:11 -0400 X-AuditID: b6c32a2c-f79e76d00000129c-4f-595d20f44c69 From: Krzysztof Opasiak To: gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Krzysztof Opasiak Subject: [PATCH 1/4] android: binder: Use dedicated helper to access rlimit value Date: Wed, 05 Jul 2017 19:24:44 +0200 Message-id: <20170705172444.7853-1-k.opasiak@samsung.com> X-Mailer: git-send-email 2.9.3 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFIsWRmVeSWpSXmKPExsWy7bCmuu4XhdhIg32POCze/73PZrHnzC92 i+bF69ksbk+cxmZxedccNovXm/4yOrB5bNu9jdXj3r7DLB77565h9+jbsorR4/MmuQDWKC6b lNSczLLUIn27BK6M/T/2MxesYKvY3PeLsYFxMWsXIyeHhICJRO/kv4wQtpjEhXvr2boYuTiE BJYySty+MIcVwvnMKLH7aRsTTMeFxedYIBI7GCUOTnrODOH8YpS4NXELexcjBwebgL7EvF2i IA0iAu4Sv25vB1vBLJApse/vVbBBwgLBEi//XGAHsVkEVCVa3u9jA7F5BSwlzj2+xgyxTE7i 0rYvYPMlBI6wSTxfNokFZL6EgKzEpgNQNS4Sx6evgbKFJV4d38IOYUtJdHfMYofobWaU6Njz jAXCmcAosW3dIagqa4k/qyayQVzHJ9H7+wkTxAJeiY42IYgSD4n21TuhYeQocX7jSTBbSCBW ovP2DMYJjNILGBlWMYqlFhTnpqcWmxYY6hUn5haX5qXrJefnbmIEx6iWzg7Gewu8DzEKcDAq 8fB2vIuJFGJNLCuuzD3EKMHBrCTCu/Qt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MTR: 20000000000000000@CPGS X-CMS-MailID: 20170705172507epcas5p41e2e3e93ed9ab0fd0094ba16dd463671 X-Msg-Generator: CA X-Sender-IP: 182.195.42.80 X-Local-Sender: =?UTF-8?B?S3J6eXN6dG9mIE9wYXNpYWsbU1JQT0wtU3lzdGVtIChUUCkb?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NvZnR3YXJlIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?S3J6eXN6dG9mIE9wYXNpYWsbU1JQT0wtU3lzdGVtIChUUCkb?= =?UTF-8?B?U2Ftc3VuZ8KgRWxlY3Ryb25pY3MbU29mdHdhcmUgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTY=?= CMS-TYPE: 105P X-CMS-RootMailID: 20170705172507epcas5p41e2e3e93ed9ab0fd0094ba16dd463671 X-RootMTR: 20170705172507epcas5p41e2e3e93ed9ab0fd0094ba16dd463671 References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 23 Use rlimit() helper instead of manually writing whole chain from current task to rlim_cur Signed-off-by: Krzysztof Opasiak --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index aae4d8d4be36..d802384ccdd3 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -472,7 +472,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); -- 2.9.3