]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/uverbs: Use an unambiguous errno for method not supported
authorJason Gunthorpe <jgg@mellanox.com>
Thu, 25 Jan 2018 02:58:34 +0000 (19:58 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 25 Jan 2018 15:57:29 +0000 (10:57 -0500)
commitb686de37259f180b1be9d5e87a25d185d650e485
tree3fdc55f1fe0ba5acf31927b714d1319024ca4229
parent5ec1433b8f72f1d1675360f5084ddcd6a49ad0e4
RDMA/uverbs: Use an unambiguous errno for method not supported

Returning EOPNOTSUPP is problematic because it can also be
returned by the method function, and we use it in quite a few
places in drivers these days.

Instead, dedicate EPROTONOSUPPORT to indicate that the ioctl framework
is enabled but the requested object and method are not supported by
the kernel. No other case will return this code, and it lets userspace
know to fall back to write().

grep says we do not use it today in drivers/infiniband subsystem.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_ioctl.c