nvme-multipath: fix double initialization of ANA state
mainline inclusion from mainline-v5.13-rc2 commit 5e1f6899 category: bugfix bugzilla: NA CVE: NA Link: https://gitee.com/openeuler/kernel/issues/I4JFBE?from=project-issue ------------------------------------------------- nvme_init_identify and thus nvme_mpath_init can be called multiple times and thus must not overwrite potentially initialized or in-use fields. Split out a helper for the basic initialization when the controller is initialized and make sure the init_identify path does not blindly change in-use data structures. Fixes: 0d0b660f ("nvme: add ANA support") Reported-by: NMartin Wilck <mwilck@suse.com> Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NSagi Grimberg <sagi@grimberg.me> Reviewed-by: NHannes Reinecke <hare@suse.de> conflicts: drivers/nvme/host/core.c drivers/nvme/host/multipath.c [adjust context] Signed-off-by: Nchengjike <chengjike.cheng@huawei.com> Reviewed-by: NAo Sun <sunao.sun@huawei.com> Reviewed-by: NZhenwei Yang <yangzhenwei@huawei.com> Reviewed-by: NHou Tao <houtao1@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录