Skip to content

Commit 334e641

Browse files
Jesus Sanchez-Palenciadavem330
authored andcommitted
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: 2819075 ("sock: permit SO_ZEROCOPY on PF_RDS socket") Signed-off-by: Jesus Sanchez-Palencia <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Acked-by: Sowmini Varadhan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 92dbb33 commit 334e641

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/core/sock.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,9 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
10621062
ret = -EINVAL;
10631063
else
10641064
sock_valbool_flag(sk, SOCK_ZEROCOPY, valbool);
1065-
break;
10661065
}
1066+
break;
1067+
10671068
default:
10681069
ret = -ENOPROTOOPT;
10691070
break;

0 commit comments

Comments
 (0)