OSDN Git Service

RDMA/rxe: Always return ERR_PTR from rxe_create_mmap_info()
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Sat, 25 Apr 2020 23:35:45 +0000 (00:35 +0100)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 12 May 2020 14:47:00 +0000 (11:47 -0300)
commitbb43c8e382e5da0ee253e3105d4099820ff4d922
tree232371068813294aecaa2f0f70f69d4e0da3a9a5
parent37e31d2d26a4124506c24e95434e9baf3405a23a
RDMA/rxe: Always return ERR_PTR from rxe_create_mmap_info()

The commit below modified rxe_create_mmap_info() to return ERR_PTR's but
didn't update the callers to handle them. Modify rxe_create_mmap_info() to
only return ERR_PTR and fix all error checking after
rxe_create_mmap_info() is called.

Ensure that all other exit paths properly set the error return.

Fixes: ff23dfa13457 ("IB: Pass only ib_udata in function prototypes")
Link: https://lore.kernel.org/r/20200425233545.17210-1-sudipm.mukherjee@gmail.com
Link: https://lore.kernel.org/r/20200511183742.GB225608@mwanda
Cc: stable@vger.kernel.org [5.4+]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/rxe/rxe_mmap.c
drivers/infiniband/sw/rxe/rxe_queue.c