Commit 147c56db authored by Hui Tang's avatar Hui Tang
Browse files

sched: programmable: Allow set tag for pid 1.

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9NQM5


CVE: NA

--------------------------------

There is no reason to prevent user from setting tag for pid 1,
which should be up to the user to decide it. So removing the
check for pid 1.

Fixes: 34239429 ("sched: programmable: Add user interface of task tag")
Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
parent 15bef328
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -3773,11 +3773,6 @@ static ssize_t pid_tag_write(struct file *file, const char __user *buf,
	if (!tsk)
		return -ESRCH;

	if (unlikely(tsk->pid == 1)) {
		err = -EPERM;
		goto out;
	}

	err = kstrtol_from_user(buf, count, 0, &tag);
	if (err)
		goto out;