mirror of https://gitee.com/openkylin/linux.git
selinux: fix sel_write_enforce broken return value
Return a negative error value like the rest of the entries in this function. Cc: <stable@vger.kernel.org> Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> [PM: tweaked subject line] Signed-off-by: Paul Moore <pmoore@redhat.com>
This commit is contained in:
parent
04f81f0154
commit
6436a123a1
|
@ -152,7 +152,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
|
|||
goto out;
|
||||
|
||||
/* No partial writes. */
|
||||
length = EINVAL;
|
||||
length = -EINVAL;
|
||||
if (*ppos != 0)
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Reference in New Issue