vsock: minor clean up of ioctl error handling
Subsystems (4)
cover vsock: minor clean up of ioctl error handling
From: Colin Ian King <[email protected]>
Two minor changes to the ioctl error handling.
Colin Ian King (2):
vsock: remove ratelimit unknown ioctl message
vsock: fix the error return when an invalid ioctl command is used
net/vmw_vsock/af_vsock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.27.0
PATCH v2 1/2 vsock: remove ratelimit unknown ioctl message
From: Colin Ian King <[email protected]>
When exercising the kernel with stress-ng with some ioctl tests the "Unknown ioctl" error message is spamming the kernel log at a high rate. Remove this message.
--- net/vmw_vsock/af_vsock.c | 1 - 1 file changed, 1 deletion(-)
net/vmw_vsock/af_vsock.c +0 -1
@@ -2072,7 +2072,6 @@ static long vsock_dev_do_ioctl(struct file *filp,break ;default : -pr_err ("Unknown ioctl %d\n" , cmd); retval = -EINVAL ; }
Signature · 1 line
2.27.0
Re: [PATCH 1/2][V2] vsock: remove ratelimit unknown ioctl message
Quoted 10 lines · Colin King
From: Colin Ian King <[email protected]>
When exercising the kernel with stress-ng with some ioctl tests the "Unknown ioctl" error message is spamming the kernel log at a high rate. Remove this message.
Signed-off-by Colin Ian King <[email protected]>---
net/vmw_vsock/af_vsock.c| 1 -1 file changed, 1 deletion(-)
Quoted 16 lines
net/vmw_vsock/af_vsock.c +0
-1@@ -2072,7 +2072,6 @@ static long vsock_dev_do_ioctl(struct file *filp,break ;default : -pr_err ("Unknown ioctl %d\n" , cmd); retval = -EINVAL ; }Signature · 1 line
2.27.0
PATCH 2/2 vsock: fix the error return when an invalid ioctl command is used
In reply to Colin KingFrom: Colin Ian King <[email protected]>
Currently when an invalid ioctl command is used the error return is -EINVAL. Fix this by returning the correct error -ENOIOCTLCMD.
--- net/vmw_vsock/af_vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/vmw_vsock/af_vsock.c +1 -1
@@ -2072,7 +2072,7 @@ static long vsock_dev_do_ioctl(struct file *filp,break ;default : - retval = -EINVAL ; + retval = -ENOIOCTLCMD ; }return retval;
Signature · 1 line
2.27.0
Re: [PATCH 2/2] vsock: fix the error return when an invalid ioctl command is used
Quoted 9 lines · Colin King
From: Colin Ian King <[email protected]>
Currently when an invalid ioctl command is used the error return is
-EINVAL. Fix this by returning the correct error-ENOIOCTLCMD.Signed-off-by Colin Ian King <[email protected]>---
net/vmw_vsock/af_vsock.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 17 lines
net/vmw_vsock/af_vsock.c +1
-1@@ -2072,7 +2072,7 @@ static long vsock_dev_do_ioctl(struct file *filp,break ;default : - retval = -EINVAL ; + retval = -ENOIOCTLCMD ; }return retval;Signature · 1 line
2.27.0
Quoted 3 lines · On Tue, 27 Oct 2020 09:09:40 +0000 Colin King wrote:
From: Colin Ian King <[email protected]>
Two minor changes to the ioctl error handling.
Applied, thanks!