]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Return ENOSYS for unimplemented commands (not EINVAL)
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Sun, 6 Sep 2009 03:24:24 +0000 (20:24 -0700)
committerRoland Dreier <rolandd@cisco.com>
Sun, 6 Sep 2009 03:24:24 +0000 (20:24 -0700)
commit42d67dc2f2bba85895cd3889cf6a33fb0fd49d9d
tree8b7c6045d6ec346ccf8a4d845877ba656b6f0dc4
parent0ea8c1a98b1a7db0ba9b653331cd5ace6be49d13
IB/uverbs: Return ENOSYS for unimplemented commands (not EINVAL)

Since the original commit fab0a692 ("[IB] uverbs: Add a mask of device
methods allowed for userspace"), the uverbs core returns EINVAL for
commands not implemented by a specific low-level driver.

This creates a problem that there is no way to tell the difference
between an unimplemented command and an implemented one which is
incorrectly invoked (which also returns EINVAL).

The fix is to have unimplemented commands return ENOSYS.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/uverbs_main.c