vsock/vmci: convert VMCI error code to -ENOMEM on send
Subsystems (5)
PATCH 1/1 vsock/vmci: convert VMCI error code to -ENOMEM on send
This adds conversion of VMCI specific error code to general -ENOMEM. It is needed, because af_vsock.c passes error value returned from transport to the user, which does not expect to get VMCI_ERROR_* values.
Fixes c43170b7e157 ("vsock: return errors other than -ENOMEM to socket")
Signed-off-by Arseniy Krasnov <[email protected]>
Reviewed-by Vishnu Dasa <[email protected]>
Reviewed-by Stefano Garzarella <[email protected]>
--- net/vmw_vsock/vmci_transport.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
net/vmw_vsock/vmci_transport.c +7 -1
@@ -1842,7 +1842,13 @@ static ssize_t vmci_transport_stream_enqueue(struct msghdr *msg, size_t len) { -return vmci_qpair_enquev (vmci_trans (vsk)->qpair, msg, len,0 ); + ssize_t err; + + err =vmci_qpair_enquev (vmci_trans (vsk)->qpair, msg, len,0 ); +if (err <0 ) + err = -ENOMEM ; + +return err; }static s64 vmci_transport_stream_has_data (struct vsock_sock *vsk)
Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 10 lines · On Fri, 31 Mar 2023 10:56:41 +0300 you wrote:
This adds conversion of VMCI specific error code to general
-ENOMEM. It is needed, becauseaf_vsock.cpasses error value returned from transport to the user, which does not expect to get VMCI_ERROR_* values.Fixes c43170b7e157 ("vsock: return errors other than -ENOMEM to socket")Signed-off-by Arseniy Krasnov <[email protected]>Reviewed-by Vishnu Dasa <[email protected]>Reviewed-by Stefano Garzarella <[email protected]>[...]
Here is the summary with links:
- [net] vsock/vmci: convert VMCI error code to -ENOMEM on send
https://git.kernel.org/netdev/net/c/ffa5395a7901
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html