Re: [PATCH v2 15/36] target: Add a missing target_put_nacl() call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 01, 2017 at 04:58:32PM -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);

I don't think this is needed - target_put_nacl just causes a call
to complete on acl_free_comp, and if this path is taken no one
could be waiting on the 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



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux