[PATCH] nvme-multipath: fix double initialization of ANA state

Hannes Reinecke hare at suse.de
Fri May 7 09:54:17 PDT 2021


On 5/6/21 3:48 PM, Christoph Hellwig wrote:
> 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: 0d0b660f214d ("nvme: add ANA support")
> Reported-by: Martin Wilck <mwilck at suse.com>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
>   drivers/nvme/host/core.c      |  3 +-
>   drivers/nvme/host/multipath.c | 53 ++++++++++++++++++-----------------
>   drivers/nvme/host/nvme.h      |  8 ++++--
>   3 files changed, 36 insertions(+), 28 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the Linux-nvme mailing list