linux/drivers/nvme/host
Max Gurtovoy 87fd125344 nvme-rdma: remove redundant reference between ib_device and tagset
In the past, before adding f41725bb ("nvme-rdma: Use mr pool") commit,
we needed a reference on the ib_device as long as the tagset
was alive, as the MRs in the request structures needed a valid ib_device.
Now, we allocate/deallocate MR pool per QP and consume on demand.

Also remove nvme_rdma_free_tagset function and use blk_mq_free_tag_set
instead, as it unneeded anymore.

This commit also fixes a memory leakage and possible segmentation fault.
When configuring the system with NIC teaming (aka bonding), we use 1
network interface to create an HA connection to the target side. In case
one connection breaks down, nvme-rdma driver will get notification from
rdma-cm layer that underlying address was change and will start error
recovery process. During this process, we'll reconnect to the target
via the second interface in the bond without destroying the tagset.
This will cause a leakage of the initial rdma device (ndev) and miscount
in the reference count of the new created rdma device (new ndev). In
the final destruction (or in another error flow), we'll get a warning
dump from the ib_dealloc_pd that we still have inflight MR's related to
that pd. This happens becasue of the miscount of the reference tag of
the rdma device and causing access violation to it's elements (some
queues are not destroyed yet).

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2019-05-13 16:00:03 +02:00
..
core.c nvme-pci: add known admin effects to augument admin effects log page 2019-05-13 16:00:03 +02:00
fabrics.c nvme-fabrics: check more command sizes 2019-05-01 09:17:27 -04:00
fabrics.h nvme-fabrics: convert to SPDX identifiers 2019-02-20 07:22:13 -07:00
fault_inject.c nvme: convert to SPDX identifiers 2019-02-20 07:22:28 -07:00
fc.c nvme-fc: correct csn initialization and increments on error 2019-04-11 17:28:30 +02:00
Kconfig nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
lightnvm.c lightnvm: Inherit mdts from the parent nvme device 2019-05-06 10:19:17 -06:00
Makefile nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
multipath.c nvme-multipath: don't print ANA group state by default 2019-05-01 09:17:16 -04:00
nvme.h nvme: mark nvme_core_init and nvme_core_exit static 2019-05-01 09:18:47 -04:00
pci.c nvme-pci: mark expected switch fall-through 2019-05-13 16:00:03 +02:00
rdma.c nvme-rdma: remove redundant reference between ib_device and tagset 2019-05-13 16:00:03 +02:00
tcp.c nvme-tcp: fix possible null deref on a timed out io queue connect 2019-05-01 09:17:15 -04:00
trace.c nvme: add get-feature to admin cmds tracer 2019-03-13 12:05:39 -06:00
trace.h nvme-trace: fix cdw10 buffer overrun 2019-03-13 12:05:39 -06:00