]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Use u64_to_user_ptr() not a union
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 13 Feb 2018 10:18:31 +0000 (12:18 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 15 Feb 2018 21:59:45 +0000 (14:59 -0700)
commit5c90c77359e6fc69469ae8f3830768b276685953
tree72e1fb9014573f63e80d6558dcd4826239202849
parent3ddfb353a45788860e676f79e19dd9e549c0842a
IB/uverbs: Use u64_to_user_ptr() not a union

The union approach will get the endianness wrong sometimes if the kernel's
pointer size is 32 bits resulting in EFAULTs when trying to copy to/from
user.

Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_std_types.c
include/rdma/uverbs_ioctl.h