]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/cm: Fix access to uninitialized variable
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 28 Jan 2018 09:25:33 +0000 (11:25 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sun, 28 Jan 2018 21:07:16 +0000 (14:07 -0700)
commit96193e2e5eaf32c7a115483eee70af4d19964131
treed3f7cbcea3ddf88f2120ee15ecf7d6f9ee641539
parent198f1571d709aa0d3091bdffe18a86ed1c41be13
RDMA/cm: Fix access to uninitialized variable

The ndev will be initialized and held only for successful
ib_get_cached_gid(), otherwise it is garbage stack memory.
Calling dev_put() in failure path is wrong.

Fixes: 2cd71882c48b ("IB/cm: Refactor to avoid setting path record software only fields")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cm.c