Spdk/test/unit/lib/nvmf
Daniel Verkamp 8af4b6c40f nvmf: fix potential use-after-free in hot remove
The subsystem->ns array may be resized with realloc(), so old ns
pointers can become invalid.

To fix this, allocate each ns as a separate object, and change the
subsystem->ns[] array to point to the namespaces rather than containing
them.

Change-Id: I873502fa90cf840e4eaa9b1abd94a95afe0f737f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/399726
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-16 13:06:11 -05:00
..
ctrlr_bdev.c test: use spdk.unittest.mk for nvmf unit tests 2018-02-14 10:40:40 -05:00
ctrlr_discovery.c test: use spdk.unittest.mk for nvmf unit tests 2018-02-14 10:40:40 -05:00
ctrlr.c nvmf: Solve the coredump issue when client conduct nvme disconnect 2018-02-15 13:19:08 -05:00
request.c test: use spdk.unittest.mk for nvmf unit tests 2018-02-14 10:40:40 -05:00
subsystem.c nvmf: fix potential use-after-free in hot remove 2018-02-16 13:06:11 -05:00
Makefile nvmf: Rename spdk_nvmf_session to spdk_nvmf_ctrlr 2017-08-08 13:46:48 -04:00