Commit 7b994b0
nvme-multipath: fix double initialization of ANA state
commit 5e1f689 upstream.
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: 0d0b660 ("nvme: add ANA support")
Reported-by: Martin Wilck <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent e2c26dd commit 7b994b0
3 files changed
+37
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3131 | 3131 | | |
3132 | 3132 | | |
3133 | 3133 | | |
3134 | | - | |
| 3134 | + | |
3135 | 3135 | | |
3136 | 3136 | | |
3137 | 3137 | | |
| |||
4517 | 4517 | | |
4518 | 4518 | | |
4519 | 4519 | | |
| 4520 | + | |
4520 | 4521 | | |
4521 | 4522 | | |
4522 | 4523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
712 | 712 | | |
713 | | - | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
714 | 723 | | |
715 | 724 | | |
716 | 725 | | |
| |||
722 | 731 | | |
723 | 732 | | |
724 | 733 | | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
732 | 738 | | |
733 | | - | |
734 | | - | |
735 | | - | |
| 739 | + | |
| 740 | + | |
736 | 741 | | |
737 | | - | |
| 742 | + | |
738 | 743 | | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
746 | 750 | | |
747 | | - | |
| 751 | + | |
748 | 752 | | |
749 | 753 | | |
750 | | - | |
| 754 | + | |
751 | 755 | | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
756 | 759 | | |
757 | 760 | | |
758 | 761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | | - | |
| 657 | + | |
| 658 | + | |
658 | 659 | | |
659 | 660 | | |
660 | 661 | | |
| |||
730 | 731 | | |
731 | 732 | | |
732 | 733 | | |
733 | | - | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
734 | 738 | | |
735 | 739 | | |
736 | 740 | | |
| |||
0 commit comments