Skip to content

Commit

Permalink
binfmt_misc: add missing 'break' statement
Browse files Browse the repository at this point in the history
A missing 'break' statement in bm_status_write() results in a user program
receiving '3' when doing the following:

  write(fd, "-1", 2);

Signed-off-by: Luis Henriques <[email protected]>
Alexander Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Luis Henriques authored and torvalds committed Apr 3, 2014
1 parent 7a42d4b commit b003f96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/binfmt_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ static ssize_t bm_status_write(struct file * file, const char __user * buffer,

mutex_unlock(&root->d_inode->i_mutex);
dput(root);
break;
default: return res;
}
return count;
Expand Down

0 comments on commit b003f96

Please sign in to comment.