diff options
| author | Ryan Pennucci <decimalman@gmail.com> | 2016-07-06 11:12:43 -0400 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:57:22 +0200 |
| commit | 282aa3a65f391e48f4158b3ce6d7a14808e2beed (patch) | |
| tree | a9fecd70261a1d2e00a2a4f6583cb29b1038baaf | |
| parent | caf69bed3586dbc7e52e11ddd516aad261639b69 (diff) | |
mm: limit UKSM sleep time instead of failing
| -rw-r--r-- | mm/uksm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4927,9 +4927,12 @@ static ssize_t sleep_millisecs_store(struct kobject *kobj, int err; err = strict_strtoul(buf, 10, &msecs); - if (err || msecs > MSEC_PER_SEC) + if (err) return -EINVAL; + if (msecs > MSEC_PER_SEC) + msecs = MSEC_PER_SEC; + uksm_sleep_jiffies = msecs_to_jiffies(msecs); return count; |
