Commit 4d4a72b3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Yang Yingliang
Browse files

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: default avatarMartin Wilck <mwilck@suse.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>

conflicts:
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c
[adjust context]

Signed-off-by: default avatarchengjike <chengjike.cheng@huawei.com>
Reviewed-by: default avatarAo Sun <sunao.sun@huawei.com>
Reviewed-by: default avatarZhenwei Yang <yangzhenwei@huawei.com>
Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent d8d45e68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment