]> asedeno.scripts.mit.edu Git - linux.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)
commit3624a8f02568f08aef299d3b117f2226f621177d
tree3fdc55f1fe0ba5acf31927b714d1319024ca4229
parentf2fe3c4e0911fca86438852876a7f305b43ac0c9
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