]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: socket: Fix missing break in switch statement
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 24 Apr 2019 15:31:24 +0000 (10:31 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Apr 2019 15:28:47 +0000 (11:28 -0400)
Add missing break statement in order to prevent the code from falling
through to cases SIOCGSTAMP_NEW and SIOCGSTAMPNS_NEW.

This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.

Fixes: 0768e17073dc ("net: socket: implement 64-bit timestamps")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/socket.c

index 8d9d4fc7d962ace489486412fb4a40ac5fef16de..a180e1a9ff23ec56563d94e6198d6c1c1c73b118 100644 (file)
@@ -1173,6 +1173,7 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
                        err = sock->ops->gettstamp(sock, argp,
                                                   cmd == SIOCGSTAMP_OLD,
                                                   !IS_ENABLED(CONFIG_64BIT));
+                       break;
                case SIOCGSTAMP_NEW:
                case SIOCGSTAMPNS_NEW:
                        if (!sock->ops->gettstamp) {