aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/rdma_core.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-11-25 20:51:17 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-11-26 16:48:07 -0700
commitda0f60df7bd5a045aa423ec64fe5d7e29ba803ff (patch)
tree08a0c90e7d48bc5ba6b442b544c9527f2682cbc7 /drivers/infiniband/core/rdma_core.h
parentRDMA/uverbs: Add structure size info to write commands (diff)
downloadlinux-dev-da0f60df7bd5a045aa423ec64fe5d7e29ba803ff.tar.xz
linux-dev-da0f60df7bd5a045aa423ec64fe5d7e29ba803ff.zip
RDMA/uverbs: Prohibit write() calls with too small buffers
The size meta-data in the prior patch describes the smallest acceptable buffer for the write() interface. Globally check this in the core code. This is necessary in the case of write() methods that have a driver udata to prevent computing a negative udata buffer length. The return code of -ENOSPC is chosen here as some of the handlers already use this code, however many other handler use EINVAL. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/rdma_core.h')
0 files changed, 0 insertions, 0 deletions