FTL: Fix error path for initializing mempools
If both allocation paths would fail, then the same mngt path would execute rollback twice, leading to use after free error. Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com> Change-Id: I55c9ea5131faabc930fd8ff92ddd9f8d0fd9a0b0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14596 Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
fc1c9aafe6
commit
691504a314
@ -69,10 +69,12 @@ ftl_mngt_init_mem_pools(struct spdk_ftl_dev *dev, struct ftl_mngt_process *mngt)
|
||||
{
|
||||
if (init_p2l_map_pool(dev)) {
|
||||
ftl_mngt_fail_step(mngt);
|
||||
return;
|
||||
}
|
||||
|
||||
if (init_band_md_pool(dev)) {
|
||||
ftl_mngt_fail_step(mngt);
|
||||
return;
|
||||
}
|
||||
|
||||
ftl_mngt_next_step(mngt);
|
||||
|
Loading…
Reference in New Issue
Block a user