diff options
Diffstat (limited to 'drivers/infiniband/core/uverbs_main.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 3a887006b25..6a5e5084db7 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -514,7 +514,8 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, | |||
514 | 514 | ||
515 | if (hdr.command < 0 || | 515 | if (hdr.command < 0 || |
516 | hdr.command >= ARRAY_SIZE(uverbs_cmd_table) || | 516 | hdr.command >= ARRAY_SIZE(uverbs_cmd_table) || |
517 | !uverbs_cmd_table[hdr.command]) | 517 | !uverbs_cmd_table[hdr.command] || |
518 | !(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command))) | ||
518 | return -EINVAL; | 519 | return -EINVAL; |
519 | 520 | ||
520 | if (!file->ucontext && | 521 | if (!file->ucontext && |