aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/core_priv.h
diff options
context:
space:
mode:
authorArtemy Kovalyov <artemyko@mellanox.com>2019-05-01 08:39:48 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-05-03 10:17:45 -0300
commit1a418f7764a00bc6ad8fd1b765b941c3a8389467 (patch)
treeb20bfdb6ed297bc29fdd338937f56612e1196072 /drivers/infiniband/core/core_priv.h
parentIB/mlx5: Add missing XRC options to QP optional params mask (diff)
downloadlinux-dev-1a418f7764a00bc6ad8fd1b765b941c3a8389467.tar.xz
linux-dev-1a418f7764a00bc6ad8fd1b765b941c3a8389467.zip
IB/core: Set qp->real_qp before it may be accessed
real_qp should be initialized before ib_destroy_qp() is called. ib_destroy_qp() may be called in the error flow if ib_create_qp_security() failed. Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/core_priv.h')
-rw-r--r--drivers/infiniband/core/core_priv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h
index d4dd360769cb..2764647056d8 100644
--- a/drivers/infiniband/core/core_priv.h
+++ b/drivers/infiniband/core/core_priv.h
@@ -304,6 +304,7 @@ static inline struct ib_qp *_ib_create_qp(struct ib_device *dev,
qp->device = dev;
qp->pd = pd;
qp->uobject = uobj;
+ qp->real_qp = qp;
/*
* We don't track XRC QPs for now, because they don't have PD
* and more importantly they are created internaly by driver,