diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-10-04 15:59:49 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-10-04 16:01:26 -0300 |
commit | c78d218fc5a9995d6b50aa38814bef4fbc88a77d (patch) | |
tree | 8c647466fa60cb281556016388adf0ad80172c8c /kernel/sched/debug.c | |
parent | 0994a1bcd5f7c0bf7ca3b4938d4f0f6928ac7886 (diff) | |
parent | 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 (diff) |
Merge tag 'v5.15-rc4' into rdma.get for-next
Merged due to dependencies in following patches.
Conflict in drivers/infiniband/hw/hfi1/ipoib_tx.c resolved by hand to take
the %p change and txq stats rename together.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'kernel/sched/debug.c')
-rw-r--r-- | kernel/sched/debug.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 49716228efb4..17a653b67006 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -173,16 +173,22 @@ static ssize_t sched_scaling_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos) { char buf[16]; + unsigned int scaling; if (cnt > 15) cnt = 15; if (copy_from_user(&buf, ubuf, cnt)) return -EFAULT; + buf[cnt] = '\0'; - if (kstrtouint(buf, 10, &sysctl_sched_tunable_scaling)) + if (kstrtouint(buf, 10, &scaling)) return -EINVAL; + if (scaling >= SCHED_TUNABLESCALING_END) + return -EINVAL; + + sysctl_sched_tunable_scaling = scaling; if (sched_update_scaling()) return -EINVAL; |