]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
IB/cm: Release previously acquired reference counter in the cm_id_priv
authorMark Zhang <markzhang@nvidia.com>
Wed, 19 Jan 2022 08:37:55 +0000 (10:37 +0200)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 10 Feb 2022 14:31:32 +0000 (15:31 +0100)
commit1264cabd191399c7acc1c19a0ce43d2ed6aa9816
treee51288c58a1cb638b34a7823aa2a9321da0b55df
parent1688d46ead61a701646bd3d3ceb07fb1014bb52b
IB/cm: Release previously acquired reference counter in the cm_id_priv

BugLink: https://bugs.launchpad.net/bugs/1960516
commit b856101a1774b5f1c8c99e8dfdef802856520732 upstream.

In failure flow, the reference counter acquired was not released,
and the following error was reported:

  drivers/infiniband/core/cm.c:3373 cm_lap_handler() warn: inconsistent
refcounting 'cm_id_priv->refcount.refs.counter':

Fixes: 7345201c3963 ("IB/cm: Improve the calling of cm_init_av_for_lap and cm_init_av_by_path")
Link: https://lore.kernel.org/r/7615f23bbb5c5b66d03f6fa13e1c99d51dae6916.1642581448.git.leonro@nvidia.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/infiniband/core/cm.c