Commit d4cd899d authored by Joe Perches's avatar Joe Perches Committed by Zefan Li

selinux: fix sel_write_enforce broken return value

commit 6436a123 upstream.

Return a negative error value like the rest of the entries in this function.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
[PM: tweaked subject line]
Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
parent e65b00ae
...@@ -150,7 +150,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf, ...@@ -150,7 +150,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
goto out; goto out;
/* No partial writes. */ /* No partial writes. */
length = EINVAL; length = -EINVAL;
if (*ppos != 0) if (*ppos != 0)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment