diff mbox

[13/34] target: Add a missing target_put_nacl() call

Message ID 20170125233646.2243-14-bart.vanassche@sandisk.com (mailing list archive)
State Superseded
Headers show

Commit Message

Bart Van Assche Jan. 25, 2017, 11:36 p.m. UTC
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@sandisk.com>
Cc: Nicholas A. Bellinger <nab@linux-iscsi.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: David Disseldorp <ddiss@suse.de>
---
 drivers/target/target_core_transport.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Hannes Reinecke Jan. 26, 2017, 7:59 a.m. UTC | #1
On 01/26/2017 12:36 AM, 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@sandisk.com>
> Cc: Nicholas A. Bellinger <nab@linux-iscsi.org>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Andy Grover <agrover@redhat.com>
> Cc: David Disseldorp <ddiss@suse.de>
> ---
>  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 9881f0ac08d2..55e1d3898bdd 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -554,6 +554,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",
> 
Reviewed-by: Hannes Reiencke <hare@suse.com>

Cheers,

Hannes
diff mbox

Patch

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 9881f0ac08d2..55e1d3898bdd 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -554,6 +554,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",