binfmt_misc: add missing 'break' statement
authorLuis Henriques <luis.henriques@canonical.com>
Thu, 3 Apr 2014 21:49:34 +0000 (14:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:16 +0000 (16:21 -0700)
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 <luis.henriques@canonical.com>
Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_misc.c

index 1c740e152f380c08765efed43de7cf9afb9735f1..b60500300dd7803e20655d50437aec7dfefeedec 100644 (file)
@@ -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;