Skip to content

Commit 6436a12

Browse files
JoePerchespcmoore
authored andcommitted
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>
1 parent 04f81f0 commit 6436a12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/selinux/selinuxfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
152152
goto out;
153153

154154
/* No partial writes. */
155-
length = EINVAL;
155+
length = -EINVAL;
156156
if (*ppos != 0)
157157
goto out;
158158

0 commit comments

Comments
 (0)