numam-spdk/lib/nvmf
Ziye Yang 4cd6544d44 nvmf: solve the memory leak issue caused by subsystem listerner port
The possible issue could be following if you shutdown NVMe-oF target
with TCP transport as an example,

=================================================================
==61022==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 560 byte(s) in 1 object(s) allocated from:
    #0 0x7ffff6efcfe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
    #1 0x4c6216 in spdk_nvmf_tcp_listen /home/ziyeyang/spdk/lib/nvmf/tcp.c:680

Indirect leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7ffff6efcfe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
    #1 0x4a77b8 in spdk_posix_sock_create /home/ziyeyang/spdk/lib/sock/posix/posix.c:291

After checking the issue, it seems that we did not call
spdk_nvmf_transport_stop_listen when removing the subsystem listener.
And this patch can solve this issue.

Change-Id: Ic75d99cb0c6a3ba1c47ac79a2d8e3887b0f6b012
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447020
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-08 20:33:33 +00:00
..
ctrlr_bdev.c nvmf: Expose bdev's PI setting to NVMe-oF Initiator 2019-02-22 00:36:55 +00:00
ctrlr_discovery.c nvmf: Only present subsystem if it is ready 2019-01-07 06:02:26 +00:00
ctrlr.c nvmf: add namespace reservation release command support 2019-03-08 04:48:18 +00:00
Makefile nvmf: Collapse request.c into ctrlr.c 2019-02-04 18:11:33 +00:00
nvmf_fc.h lib/nvmf: fix a typo error 2018-10-12 17:40:16 +00:00
nvmf_internal.h nvmf: add namespace reservation acquire command support 2019-03-07 06:46:45 +00:00
nvmf.c nvmf: remove qpair state activating. 2019-02-12 20:39:44 +00:00
rdma.c rdma: register a poller to destroy defunct qpairs 2019-03-04 19:12:48 +00:00
subsystem.c nvmf: solve the memory leak issue caused by subsystem listerner port 2019-03-08 20:33:33 +00:00
tcp.c nvme/tcp: optimize nvme_tcp_build_iovecs function. 2019-03-07 02:59:33 +00:00
transport.c nvmf: use io unit size in transport buffer pools 2019-02-12 23:34:20 +00:00
transport.h nvmf/transport: move buffer_pool to generic struct. 2019-01-17 19:42:01 +00:00