OSDN Git Service

RDMA/ucma: Check for a cm_id->device in all user calls that need it
authorJason Gunthorpe <jgg@mellanox.com>
Thu, 5 Apr 2018 03:00:01 +0000 (21:00 -0600)
committerDoug Ledford <dledford@redhat.com>
Fri, 20 Apr 2018 02:01:11 +0000 (22:01 -0400)
commit8b77586bd8fe600d97f922c79f7222c46f37c118
tree98c5e90e52ddcde6489fe9c731c044ba06397e98
parente33514f2e930ad800fa52db19e889bb0fba25419
RDMA/ucma: Check for a cm_id->device in all user calls that need it

This is done by auditing all callers of ucma_get_ctx and switching the
ones that unconditionally touch ->device to ucma_get_ctx_dev. This covers
a little less than  half of the call sites.

The 11 remaining call sites to ucma_get_ctx() were manually audited.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/ucma.c