]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
RDMA/qedr: Fix srqs xarray initialization
authorMichal Kalderon <michal.kalderon@marvell.com>
Sun, 27 Oct 2019 20:04:48 +0000 (22:04 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 14:16:07 +0000 (08:16 -0600)
BugLink: https://bugs.launchpad.net/bugs/1858428
[ Upstream commit 73ab512f720298aabe23b34110e3f6a8545b0ba5 ]

There was a missing initialization for the srqs xarray.
SRQs xarray can also be called from irq context when searching
for an element and uses the xa_XXX_irq apis, therefore should
be initialized with IRQ flags.

Fixes: 9fd15987ed27 ("qedr: Convert srqidr to XArray")
Link: https://lore.kernel.org/r/20191027200451.28187-2-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/infiniband/hw/qedr/main.c

index dc71b6e16a07f300306a2d39b255d546ac3a38ea..b462eaca1ee3c3ee49a3e5f9b4e7bbe6b1796eb9 100644 (file)
@@ -357,6 +357,7 @@ static int qedr_alloc_resources(struct qedr_dev *dev)
                return -ENOMEM;
 
        spin_lock_init(&dev->sgid_lock);
+       xa_init_flags(&dev->srqs, XA_FLAGS_LOCK_IRQ);
 
        if (IS_IWARP(dev)) {
                xa_init_flags(&dev->qps, XA_FLAGS_LOCK_IRQ);