Message ID | d1e9b61a-ab10-5ecf-8fd1-c13155d2ed45@huawei.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
Series | [dm-level] master - libmultipath: fix use after free when iscsi logs in | expand |
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index 3dbbaa0..9bbe5d1 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -93,6 +93,8 @@ int adopt_paths(vector pathvec, struct multipath *mpp) void orphan_path(struct path *pp, const char *reason) { condlog(3, "%s: orphan path, %s", pp->dev, reason); + if (pp->mpp && pp->mpp->hwe == pp->hwe) + pp->mpp->hwe = NULL; pp->mpp = NULL; pp->dmstate = PSTATE_UNDEF; pp->uid_attribute = NULL;