numam-spdk/lib/ioat
Zhiqiang Liu 3630473789 ioat: fix potential double free problem in ioat_channel_start()
In ioat_channel_start(), if spdk_vtophys(ioat->comp_update) returns
SPDK_VTOPHYS_ERROR, spdk_free is called to free ioat->comp_update,
and ioat->comp_update is not set to NULL. However, the caller
ioat_attach() will also call ioat_channel_destruct() to free
ioat->comp_update, then double-free problem occurs.

Here, we will not free ioat->comp_update in ioat_channel_start(),
ioat_channel_destruct() will do that.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: I3be19a3feec5c2188051ee67820bfd1e61de9b48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8300
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-06-16 09:00:37 +00:00
..
ioat_internal.h ioat: fix typo on IOAT_DEFAULT_ORDER comment 2018-07-05 16:24:56 +00:00
ioat.c ioat: fix potential double free problem in ioat_channel_start() 2021-06-16 09:00:37 +00:00
Makefile so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
spdk_ioat.map lib/ioat: add mew API to get the max # of descriptors supported 2020-07-23 22:26:39 +00:00