On Wed, 2017-02-01 at 16:58 -0800, Bart Van Assche wrote: > Ensure that complete(&nacl->acl_free_comp) is called before the > node ACL is freed. > > Fixes: commit 21aaa23b0ebb ("target: Obtain se_node_acl->acl_kref during get_initiator_node_acl") > Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> > Reviewed-by: Hannes Reiencke <hare@xxxxxxxx> > Cc: Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Andy Grover <agrover@xxxxxxxxxx> > Cc: David Disseldorp <ddiss@xxxxxxx> > --- > drivers/target/target_core_transport.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c > index 1ded71800a2b..782b511c4f5f 100644 > --- a/drivers/target/target_core_transport.c > +++ b/drivers/target/target_core_transport.c > @@ -568,6 +568,7 @@ void transport_deregister_session(struct se_session *se_sess) > core_tpg_wait_for_nacl_pr_ref(se_nacl); > core_free_device_list_for_node(se_nacl, se_tpg); > se_sess->se_node_acl = NULL; > + target_put_nacl(se_nacl); > kfree(se_nacl); > } > pr_debug("TARGET_CORE[%s]: Deregistered fabric_sess\n", Btw, this conflicts with a bug-fix to address a long-standing double free of dynamic node_acls with multiple-sessions here: https://git.kernel.org/cgit/linux/kernel/git/nab/target-pending.git/commit/?id=e26e79a32f59db645df686de07ab20c0d820acd1 So you'll want to drop this one in favor of the proper bug-fix of moving the dynamic node_acl release into target_complete_nacl(). -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html