PM / devfreq: rk3399_dmc: rename driver and internals to rockchip
[firefly-linux-kernel-4.4.55.git] / kernel / sys.c
index b5a8e844a96887e2d4253536a5a45dd2a0ca296e..ba3ddb43dd9fe4cca48544ae127702a424adacbb 100644 (file)
@@ -2319,7 +2319,10 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
                error = perf_event_task_enable();
                break;
        case PR_GET_TIMERSLACK:
-               error = current->timer_slack_ns;
+               if (current->timer_slack_ns > ULONG_MAX)
+                       error = ULONG_MAX;
+               else
+                       error = current->timer_slack_ns;
                break;
        case PR_SET_TIMERSLACK:
                if (arg2 <= 0)