linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: socket: Fix missing break in switch statement
@ 2019-04-24 15:31 Gustavo A. R. Silva
  2019-04-24 18:45 ` Arnd Bergmann
  2019-04-26 15:29 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-04-24 15:31 UTC (permalink / raw)
  To: David S. Miller, Arnd Bergmann; +Cc: netdev, linux-kernel, Gustavo A. R. Silva

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>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-26 16:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 15:31 [PATCH net-next] net: socket: Fix missing break in switch statement Gustavo A. R. Silva
2019-04-24 18:45 ` Arnd Bergmann
2019-04-24 19:47   ` Gustavo A. R. Silva
2019-04-26 15:29 ` David Miller
2019-04-26 15:45   ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).