RE: [RFC PATCH v2 2/6] hv_sock: always return ENOMEM in case of error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Stefano Garzarella <sgarzare@xxxxxxxxxx>
> Sent: Thursday, December 1, 2022 1:24 AM
> > [...]
> >--- a/net/vmw_vsock/hyperv_transport.c
> >+++ b/net/vmw_vsock/hyperv_transport.c
> >@@ -687,7 +687,7 @@ static ssize_t hvs_stream_enqueue(struct vsock_sock
> *vsk, struct msghdr *msg,
> > 	if (bytes_written)
> > 		ret = bytes_written;
> > 	kfree(send_buf);
> >-	return ret;
> >+	return ret < 0 ? -ENOMEM : ret;
> 
> I'm not sure for hyperv we want to preserve -ENOMEM. This transport was
> added after virtio-vsock, so I think we can return the error directly.
> 
> @Dexuan what do you think?
> 
> Thanks,
> Stefano

I also think we can return the error directly.
BTW, I doubt any user really depends on the value of a non-zero error code.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux