lvol: do not reference blob after closing it
Once an lvol's blob is closed, the lvol should not retain a reference. Dereferencing lvol->blob could result in a use after free. Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: Ia96a5a488fc96d642aa4cde83c6efa5cff88b068 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16426 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
ae0b53b1b6
commit
76f4b9cbdf
@ -979,6 +979,7 @@ lvol_close_blob_cb(void *cb_arg, int lvolerrno)
|
||||
|
||||
lvol->ref_count--;
|
||||
lvol->action_in_progress = false;
|
||||
lvol->blob = NULL;
|
||||
SPDK_INFOLOG(lvol, "Lvol %s closed\n", lvol->unique_id);
|
||||
|
||||
end:
|
||||
|
Loading…
Reference in New Issue
Block a user