On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: > Signed-off-by: Andy Grover <agrover@xxxxxxxxxx> > --- > drivers/target/target_core_device.c | 12 +++------- > drivers/target/target_core_internal.h | 12 ++++++++++ > drivers/target/target_core_pr.c | 38 ++++++++++++-------------------- > drivers/target/target_core_tpg.c | 2 +- > include/target/target_core_base.h | 3 +- > 5 files changed, 32 insertions(+), 35 deletions(-) > > diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c > index 1954b0f..295b5e4 100644 > --- a/drivers/target/target_core_device.c > +++ b/drivers/target/target_core_device.c > @@ -224,8 +224,7 @@ struct se_dev_entry *core_get_se_deve_from_rtpi( > if (port->sep_rtpi != rtpi) > continue; > > - atomic_inc(&deve->pr_ref_count); > - smp_mb__after_atomic_inc(); > + get_deve(deve); > spin_unlock_irq(&nacl->device_list_lock); > > return deve; > @@ -401,12 +400,6 @@ int core_disable_device_list_for_node( > spin_lock_bh(&port->sep_alua_lock); > list_del(&deve->alua_port_node); > spin_unlock_bh(&port->sep_alua_lock); > - /* > - * Wait for any in process SPEC_I_PT=1 or REGISTER_AND_MOVE > - * PR operation to complete. > - */ > - while (atomic_read(&deve->pr_ref_count) != 0) > - cpu_relax(); > > spin_lock_irq(&nacl->device_list_lock); > /* > @@ -421,6 +414,9 @@ int core_disable_device_list_for_node( > spin_unlock_irq(&nacl->device_list_lock); > > core_scsi3_free_pr_reg_from_nacl(lun->lun_se_dev, nacl); > + > + put_deve(deve); > + > return 0; > } Same issue yet again. It's not safe to release all of the se_dev_entry pointers, UAs, and PR associations until the other references from different process contexts have been released. Also the issue with reuse of se_dev_entry also exists here. configfs_group_operations->drop_item() callbacks should not return until all references have completed. NAK. --nab -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html