Re: [PATCH 21/21] target: Avoid that core_tpg_del_initiator_node_acl() hangs

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

 



On Tue, 2016-01-05 at 14:57 +0100, Bart Van Assche wrote:
> Do not accept new sessions after core_tpg_del_initiator_node_acl()
> has set acl_stop. Ensure that core_tpg_del_initiator_node_acl()
> waits until all sessions have dropped their reference on the
> associated struct se_node_acl object by removing the sess_tearing_down
> test. Modify all target drivers such that these test the return
> value of transport_register_session().
> 
> This patch avoids that e.g. stopping the ib_srpt driver can hang as
> follows:
> 
> INFO: task rmdir:4473 blocked for more than 120 seconds.
> rmdir
> Call Trace:
>  [<ffffffff81517132>] schedule+0x42/0x90
>  [<ffffffff8151b27f>] schedule_timeout+0x17f/0x1d0
>  [<ffffffff815181b5>] wait_for_completion+0xe5/0x120
>  [<ffffffffa04aa401>] core_tpg_del_initiator_node_acl+0x171/0x220 [target_core_mod]
>  [<ffffffffa049dcaf>] target_fabric_nacl_base_release+0x4f/0x60 [target_core_mod]
>  [<ffffffffa0482bef>] config_item_release+0x6f/0xc0 [configfs]
>  [<ffffffffa0482c5b>] config_item_put+0x1b/0x20 [configfs]
>  [<ffffffffa0481f88>] configfs_rmdir+0x1e8/0x2e0 [configfs]
>  [<ffffffff81183461>] vfs_rmdir+0x81/0x120
>  [<ffffffff81187246>] do_rmdir+0x146/0x190
>  [<ffffffff811872d1>] SyS_rmdir+0x11/0x20
>  [<ffffffff8151c857>] entry_SYSCALL_64_fastpath+0x12/0x6f
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
> Cc: Andy Grover <agrover@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx>
> ---
>  drivers/target/target_core_tpg.c       |  3 ---
>  drivers/target/target_core_transport.c | 32 +++++++++++++++++++++++---------
>  2 files changed, 23 insertions(+), 12 deletions(-)
> 

Same thing here.  ib_srpt needs core_tpg_check_initiator_node_acl()
instead of an internal hack to fail the incoming login attempt if
core_tpg_del_initiator_node_acl() has already been invoked from
rmdir(2).

--
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