OSDN Git Service

RDMA/rxe: Address an issue with hardened user copy
authorBob Pearson <rpearsonhpe@gmail.com>
Thu, 27 Aug 2020 16:35:36 +0000 (11:35 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 31 Aug 2020 15:21:16 +0000 (12:21 -0300)
commit7672dac30435b6e28aebaea189ffcb233e61760d
treec5fca5fe79f6be732369c19305c9b18f2b403be1
parent63fa15dbd488457117e779f8a6b4917ba83f4b77
RDMA/rxe: Address an issue with hardened user copy

Change rxe pools to use kzalloc instead of kmem_cache to allocate memory
for rxe objects. The pools are not really necessary and they trigger
hardened user copy warnings as the ioctl framework copies the QP number
directly to userspace.

Also the general project to move object alloation to the core code will
eventually clean these out anyhow.

Link: https://lore.kernel.org/r/20200827163535.2632-1-rpearson@hpe.com
Signed-off-by: Bob Pearson <rpearson@hpe.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe.c
drivers/infiniband/sw/rxe/rxe_pool.c
drivers/infiniband/sw/rxe/rxe_pool.h