From b003f9650210fa1b3caea43201852bf2d9df7689 Mon Sep 17 00:00:00 2001 From: Luis Henriques Date: Thu, 3 Apr 2014 14:49:34 -0700 Subject: [PATCH] binfmt_misc: add missing 'break' statement 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 Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/binfmt_misc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 1c740e152f38..b60500300dd7 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -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; -- 2.30.2