* [PATCH 0/2] vsock: minor clean up of ioctl error handling
@ 2020-10-27 9:09 Colin King
2020-10-27 9:09 ` [PATCH 1/2][V2] vsock: remove ratelimit unknown ioctl message Colin King
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Colin King @ 2020-10-27 9:09 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Stefano Garzarella, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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(-)
--
2.27.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2][V2] vsock: remove ratelimit unknown ioctl message
2020-10-27 9:09 [PATCH 0/2] vsock: minor clean up of ioctl error handling Colin King
@ 2020-10-27 9:09 ` Colin King
2020-10-27 9:17 ` Stefano Garzarella
2020-10-27 9:09 ` [PATCH 2/2] vsock: fix the error return when an invalid ioctl command is used Colin King
2020-10-30 0:45 ` [PATCH 0/2] vsock: minor clean up of ioctl error handling Jakub Kicinski
2 siblings, 1 reply; 6+ messages in thread
From: Colin King @ 2020-10-27 9:09 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Stefano Garzarella, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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 <colin.king@canonical.com>
---
net/vmw_vsock/af_vsock.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 9e93bc201cc0..865331b809e4 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -2072,7 +2072,6 @@ static long vsock_dev_do_ioctl(struct file *filp,
break;
default:
- pr_err("Unknown ioctl %d\n", cmd);
retval = -EINVAL;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] vsock: fix the error return when an invalid ioctl command is used
2020-10-27 9:09 [PATCH 0/2] vsock: minor clean up of ioctl error handling Colin King
2020-10-27 9:09 ` [PATCH 1/2][V2] vsock: remove ratelimit unknown ioctl message Colin King
@ 2020-10-27 9:09 ` Colin King
2020-10-27 9:18 ` Stefano Garzarella
2020-10-30 0:45 ` [PATCH 0/2] vsock: minor clean up of ioctl error handling Jakub Kicinski
2 siblings, 1 reply; 6+ messages in thread
From: Colin King @ 2020-10-27 9:09 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Stefano Garzarella, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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 <colin.king@canonical.com>
---
net/vmw_vsock/af_vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 865331b809e4..597c86413089 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -2072,7 +2072,7 @@ static long vsock_dev_do_ioctl(struct file *filp,
break;
default:
- retval = -EINVAL;
+ retval = -ENOIOCTLCMD;
}
return retval;
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2][V2] vsock: remove ratelimit unknown ioctl message
2020-10-27 9:09 ` [PATCH 1/2][V2] vsock: remove ratelimit unknown ioctl message Colin King
@ 2020-10-27 9:17 ` Stefano Garzarella
0 siblings, 0 replies; 6+ messages in thread
From: Stefano Garzarella @ 2020-10-27 9:17 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Jakub Kicinski, netdev, kernel-janitors, linux-kernel
On Tue, Oct 27, 2020 at 09:09:41AM +0000, Colin King wrote:
>From: Colin Ian King <colin.king@canonical.com>
>
>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 <colin.king@canonical.com>
>---
> net/vmw_vsock/af_vsock.c | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>
>diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
>index 9e93bc201cc0..865331b809e4 100644
>--- a/net/vmw_vsock/af_vsock.c
>+++ b/net/vmw_vsock/af_vsock.c
>@@ -2072,7 +2072,6 @@ static long vsock_dev_do_ioctl(struct file *filp,
> break;
>
> default:
>- pr_err("Unknown ioctl %d\n", cmd);
> retval = -EINVAL;
> }
>
>--
>2.27.0
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] vsock: fix the error return when an invalid ioctl command is used
2020-10-27 9:09 ` [PATCH 2/2] vsock: fix the error return when an invalid ioctl command is used Colin King
@ 2020-10-27 9:18 ` Stefano Garzarella
0 siblings, 0 replies; 6+ messages in thread
From: Stefano Garzarella @ 2020-10-27 9:18 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Jakub Kicinski, netdev, kernel-janitors, linux-kernel
On Tue, Oct 27, 2020 at 09:09:42AM +0000, Colin King wrote:
>From: Colin Ian King <colin.king@canonical.com>
>
>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 <colin.king@canonical.com>
>---
> net/vmw_vsock/af_vsock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>
>diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
>index 865331b809e4..597c86413089 100644
>--- a/net/vmw_vsock/af_vsock.c
>+++ b/net/vmw_vsock/af_vsock.c
>@@ -2072,7 +2072,7 @@ static long vsock_dev_do_ioctl(struct file *filp,
> break;
>
> default:
>- retval = -EINVAL;
>+ retval = -ENOIOCTLCMD;
> }
>
> return retval;
>--
>2.27.0
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] vsock: minor clean up of ioctl error handling
2020-10-27 9:09 [PATCH 0/2] vsock: minor clean up of ioctl error handling Colin King
2020-10-27 9:09 ` [PATCH 1/2][V2] vsock: remove ratelimit unknown ioctl message Colin King
2020-10-27 9:09 ` [PATCH 2/2] vsock: fix the error return when an invalid ioctl command is used Colin King
@ 2020-10-30 0:45 ` Jakub Kicinski
2 siblings, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2020-10-30 0:45 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Stefano Garzarella, netdev, kernel-janitors,
linux-kernel
On Tue, 27 Oct 2020 09:09:40 +0000 Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Two minor changes to the ioctl error handling.
Applied, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-30 0:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 9:09 [PATCH 0/2] vsock: minor clean up of ioctl error handling Colin King
2020-10-27 9:09 ` [PATCH 1/2][V2] vsock: remove ratelimit unknown ioctl message Colin King
2020-10-27 9:17 ` Stefano Garzarella
2020-10-27 9:09 ` [PATCH 2/2] vsock: fix the error return when an invalid ioctl command is used Colin King
2020-10-27 9:18 ` Stefano Garzarella
2020-10-30 0:45 ` [PATCH 0/2] vsock: minor clean up of ioctl error handling Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).