diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 6e52b67b420e7a3312f463f8d3bb6baad6576041..517e3719027e619e5c7b565d1de9294dfffb5a3c 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -1198,7 +1198,7 @@ static ssize_t psi_write(struct file *file, const char __user *user_buf, if (static_branch_likely(&psi_disabled)) return -EOPNOTSUPP; - buf_size = min(nbytes, (sizeof(buf) - 1)); + buf_size = min(nbytes, sizeof(buf)); if (copy_from_user(buf, user_buf, buf_size)) return -EFAULT;