Spdk/lib/nvme
Ziye Yang b4692083f1 nvme: Fix the race condition in nvme_ctrlr_get_cc
When the applications call spdk_nvme_ctrlr_alloc_io_qpair,
there will be cmd to the admin qpairs in nvme_ctrlr_get_cc,
so there is contention. We should use the lock to protect
nvme_ctrl_get_cc.  Otherwise, the multiple threads will have
contention on the admin qpair, thus there will be coredump issue.

We get the bug when testing NVMe-oF TCP transport, and this
patch can address this issue.

Change-Id: I7247f98cdf890c2eafaf8fb94580ecd714010bd5
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/435577
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-05 00:32:21 +00:00
..
Makefile nvme: Add the NVMe over fabrics TCP/IP transport support 2018-11-19 20:36:05 +00:00
nvme_ctrlr_cmd.c NVMe: Add support for security send/receive command 2018-09-29 03:13:55 +00:00
nvme_ctrlr_ocssd_cmd.c nvme: unlock mutex on failure 2018-11-26 07:06:42 +00:00
nvme_ctrlr.c nvme: Fix the race condition in nvme_ctrlr_get_cc 2018-12-05 00:32:21 +00:00
nvme_fabric.c nvme/rdma: factor out Connect command 2018-06-27 22:59:18 +00:00
nvme_internal.h nvme: Add the NVMe over fabrics TCP/IP transport support 2018-11-19 20:36:05 +00:00
nvme_ns_cmd.c nvme: printf info after error 2018-09-18 22:40:34 +00:00
nvme_ns_ocssd_cmd.c ocssd: add chunk notification log struct 2018-09-27 01:30:45 +00:00
nvme_ns.c nvme: make identify NS id descriptors can be executed asynchronously 2018-10-15 17:57:56 +00:00
nvme_pcie.c nvme/pcie: don't allow constructing a controller from secondary process 2018-11-30 16:25:16 +00:00
nvme_qpair.c nvme: printf info after error 2018-09-18 22:40:34 +00:00
nvme_quirks.c nvme: add quirk for Intel SSDs without vendor-specific log pages 2018-08-27 14:58:48 +00:00
nvme_rdma.c nvme_rdma/nvmf: add cb_fns to check mr contiguity 2018-11-29 15:16:13 +00:00
nvme_tcp.c nvme_tcp: correctly support the incapsule data size. 2018-12-03 22:05:29 +00:00
nvme_transport.c nvme: Add the NVMe over fabrics TCP/IP transport support 2018-11-19 20:36:05 +00:00
nvme_uevent.c util: add spdk_strerror() wrapper with TLS support 2018-01-04 15:00:09 -05:00
nvme_uevent.h nvme: Add support of hotplug for vfio-attached devices. 2017-12-06 17:04:49 -05:00
nvme.c nvme: Silently ignore ns key in transport id string 2018-12-03 19:50:07 +00:00