Skip to content

Commit

Permalink
selinux: fix sel_write_enforce broken return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and Paul Moore committed Mar 25, 2015
1 parent 04f81f0 commit 6436a12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/selinuxfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6436a12

Please sign in to comment.