Commit 891cdbb
nvme-fc: use lock accessing port_state and rport state
nvme_fc_unregister_remote removes the remote port on a lport object at
any point in time when there is no active association. This races with
with the reconnect logic, because nvme_fc_create_association is not
taking a lock to check the port_state and atomically increase the
active count on the rport.
Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Closes: https://lore.kernel.org/all/u4ttvhnn7lark5w3sgrbuy2rxupcvosp4qmvj46nwzgeo5ausc@uyrkdls2muwx
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>1 parent 10c165a commit 891cdbb
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3032 | 3032 | | |
3033 | 3033 | | |
3034 | 3034 | | |
3035 | | - | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
3036 | 3038 | | |
| 3039 | + | |
3037 | 3040 | | |
3038 | | - | |
| 3041 | + | |
| 3042 | + | |
3039 | 3043 | | |
| 3044 | + | |
| 3045 | + | |
3040 | 3046 | | |
3041 | 3047 | | |
3042 | 3048 | | |
| |||
0 commit comments