Commit 89c12cc925a7d0982dc53b743a42108acc76aef4
Committed by
Nicholas Bellinger
1 parent
d9ea32bff2
Exists in
master
and in
20 other branches
target: Avoid non-existent tg_pt_gp_mem in target_alua_state_check
This patch adds an check for a non-existent port->sep_alua_tg_pt_gp_mem within target_alua_state_check(), which is not present for internally dispatched EXTENDED_COPY WRITE I/O to the destination target port. Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Martin Petersen <martin.petersen@oracle.com> Cc: Chris Mason <chris.mason@fusionio.com> Cc: Roland Dreier <roland@purestorage.com> Cc: Zach Brown <zab@redhat.com> Cc: James Bottomley <JBottomley@Parallels.com> Cc: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Nicholas Bellinger <nab@daterainc.com>
Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff
drivers/target/target_core_alua.c
... | ... | @@ -557,6 +557,9 @@ |
557 | 557 | * a ALUA logical unit group. |
558 | 558 | */ |
559 | 559 | tg_pt_gp_mem = port->sep_alua_tg_pt_gp_mem; |
560 | + if (!tg_pt_gp_mem) | |
561 | + return 0; | |
562 | + | |
560 | 563 | spin_lock(&tg_pt_gp_mem->tg_pt_gp_mem_lock); |
561 | 564 | tg_pt_gp = tg_pt_gp_mem->tg_pt_gp; |
562 | 565 | out_alua_state = atomic_read(&tg_pt_gp->tg_pt_gp_alua_access_state); |