aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2018-02-21 18:12:35 +0200
committerDoug Ledford <dledford@redhat.com>2018-02-22 22:29:11 -0500
commita9ed5b38aad704bbc250f9df2e9a29ee54388829 (patch)
treecad767da50270939cb9403a05b0843715df7ea92
parentRDMA/uverbs: Fail as early as possible if not enough header data was provided (diff)
downloadlinux-dev-a9ed5b38aad704bbc250f9df2e9a29ee54388829.tar.xz
linux-dev-a9ed5b38aad704bbc250f9df2e9a29ee54388829.zip
RDMA/uverbs: Return not supported error code for unsupported commands
Command that doesn't exist means that it is not supported, so update code to return -EOPNOTSUPP in case of failure. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/core/uverbs_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 2189a26bbe64..8d1547f5dc8e 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -714,7 +714,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
}
if (!verify_command_idx(command, extended_command)) {
- ret = -EINVAL;
+ ret = -EOPNOTSUPP;
goto out;
}