[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190424153124.GA9475@embeddedor>
Date: Wed, 24 Apr 2019 10:31:24 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: "David S. Miller" <davem@...emloft.net>,
Arnd Bergmann <arnd@...db.de>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: [PATCH net-next] net: socket: Fix missing break in switch statement
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@...eddedor.com>
---
net/socket.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/socket.c b/net/socket.c
index 8d9d4fc7d962..a180e1a9ff23 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -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) {
--
2.21.0
Powered by blists - more mailing lists