]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Add PTR_IN attributes that are allocated/copied automatically
authorMatan Barak <matanb@mellanox.com>
Sun, 17 Jun 2018 09:59:52 +0000 (12:59 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 19 Jun 2018 16:53:02 +0000 (10:53 -0600)
commitd455911678b0d17c090f28c1204c46e766fc26da
tree59191bef4b90fae122ac4741b2cbe05779a60585
parent7b7dde5a0dbe5ec134c52b28c47a0513e768cf01
IB/uverbs: Add PTR_IN attributes that are allocated/copied automatically

Adding UVERBS_ATTR_SPEC_F_ALLOC_AND_COPY flag to PTR_IN attributes.
By using this flag, the parse automatically allocates and copies the
user-space data. This data is accessible by using uverbs_attr_get_len
and uverbs_attr_get_alloced_ptr inline accessor functions from the
handler.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_ioctl.c
include/rdma/uverbs_ioctl.h