Commit d6d6742
nvme: fix RCU hole that allowed for endless looping in multipath round robin
Make nvme_ns_remove match the assumptions elsewhere.
1) !NVME_NS_READY needs to be srcu synchronized to make sure nothing is
running in __nvme_find_path or nvme_round_robin_path that will
re-assign this ns to current_path.
2) Any matching current_path entries need to be cleared before removing
from the siblings list, to prevent calling nvme_round_robin_path with
an "old" ns that's off list.
3) Finally the list_del_rcu can happen, and then synchronize again
before releasing any reference counts.
Signed-off-by: Christoph Hellwig <hch@lst.de>1 parent 5974ea7 commit d6d6742
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4031 | 4031 | | |
4032 | 4032 | | |
4033 | 4033 | | |
| 4034 | + | |
| 4035 | + | |
| 4036 | + | |
| 4037 | + | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
4034 | 4044 | | |
4035 | 4045 | | |
4036 | 4046 | | |
| |||
4042 | 4052 | | |
4043 | 4053 | | |
4044 | 4054 | | |
4045 | | - | |
4046 | | - | |
4047 | | - | |
4048 | | - | |
4049 | 4055 | | |
4050 | 4056 | | |
4051 | 4057 | | |
| |||
0 commit comments