aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2021-04-18 16:55:54 +0300
committerJason Gunthorpe <jgg@nvidia.com>2021-04-21 20:53:14 -0300
commitcb5cd0ea4eb3ce338a593a5331ddb4986ae20faa (patch)
tree7762916197bcba1b17902188b48e9ed6eb899178 /include/rdma/ib_verbs.h
parentRDMA/cma: Skip device which doesn't support CM (diff)
downloadlinux-dev-cb5cd0ea4eb3ce338a593a5331ddb4986ae20faa.tar.xz
linux-dev-cb5cd0ea4eb3ce338a593a5331ddb4986ae20faa.zip
RDMA/core: Add CM to restrack after successful attachment to a device
The device attach triggers addition of CM_ID to the restrack DB. However, when error occurs, we releasing this device, but defer CM_ID release. This causes to the situation where restrack sees CM_ID that is not valid anymore. As a solution, add the CM_ID to the resource tracking DB only after the attachment is finished. Found by syzcaller: infiniband syz0: added syz_tun rdma_rxe: ignoring netdev event = 10 for syz_tun infiniband syz0: set down infiniband syz0: ib_query_port failed (-19) restrack: ------------[ cut here ]------------ infiniband syz0: BUG: RESTRACK detected leak of resources restrack: User CM_ID object allocated by syz-executor716 is not freed restrack: ------------[ cut here ]------------ Fixes: b09c4d701220 ("RDMA/restrack: Improve readability in task name management") Link: https://lore.kernel.org/r/ab93e56ba831eac65c322b3256796fa1589ec0bb.1618753862.git.leonro@nvidia.com Signed-off-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
0 files changed, 0 insertions, 0 deletions