+4
−4
+14
−11
+5
−5
+2
−2
+6
−3
Loading
Currently nvme_completion_poll_status object is allocated using malloc, so it may cotnain some garbage. In some scenarious nvme_completion_poll_cb can be triggered before we enter spdk_nvme_wait_for_completion_*. In that case status object will be freed by nvme_completion_poll_cb if it contains a garbage in `timed_out` field. Later spdk_nvme_wait_for_completion will work with already freed memory. Fix - allocate nvme_completion_poll_status object using calloc and explicitly zerofy it before usage Fixes #1292 Change-Id: Iac39653a6cd102471de16e65814f0760bbeda7d9 Signed-off-by:Alexey Marchuk <alexeymar@mellanox.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1373 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
<dongx.yi@intel.com> Reviewed-by:
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by:
Changpeng Liu <changpeng.liu@intel.com>