[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180307174057.10461-1-jesus.sanchez-palencia@intel.com>
Date: Wed, 7 Mar 2018 09:40:57 -0800
From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@...el.com>
To: netdev@...r.kernel.org
Cc: willemb@...gle.com,
Jesus Sanchez-Palencia <jesus.sanchez-palencia@...el.com>
Subject: [PATCH net-next] sock: Fix SO_ZEROCOPY switch case
Fix the SO_ZEROCOPY switch case on sock_setsockopt() avoiding the
ret values to be overwritten by the one set on the default case.
Fixes: 28190752c7092 ("sock: permit SO_ZEROCOPY on PF_RDS socket")
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@...el.com>
Acked-by: Willem de Bruijn <willemb@...gle.com>
---
net/core/sock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 507d8c6c4319..27f218bba43f 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1062,8 +1062,9 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
ret = -EINVAL;
else
sock_valbool_flag(sk, SOCK_ZEROCOPY, valbool);
- break;
}
+ break;
+
default:
ret = -ENOPROTOOPT;
break;
--
2.16.2
Powered by blists - more mailing lists