Skip to content

Commit c43170b

Browse files
Bobby EshlemanPaolo Abeni
authored andcommitted
vsock: return errors other than -ENOMEM to socket
This removes behaviour, where error code returned from any transport was always switched to ENOMEM. For example when user tries to send too big message via SEQPACKET socket, transport layers return EMSGSIZE, but this error code was always replaced with ENOMEM and returned to user. Signed-off-by: Bobby Eshleman <[email protected]> Signed-off-by: Arseniy Krasnov <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent d4f12a8 commit c43170b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/vmw_vsock/af_vsock.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1861,8 +1861,9 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg,
18611861
written = transport->stream_enqueue(vsk,
18621862
msg, len - total_written);
18631863
}
1864+
18641865
if (written < 0) {
1865-
err = -ENOMEM;
1866+
err = written;
18661867
goto out_err;
18671868
}
18681869

0 commit comments

Comments
 (0)