]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iscsi-target: Fix potential dead-lock during node acl delete
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 20 Jan 2016 00:15:27 +0000 (16:15 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:44:26 +0000 (15:44 -0700)
commitb4ce987c9b52054fa9b691653b4e96816e8bc0e7
treeae0bb86420990492cbf88be6d9c99c06d3aa5adc
parent4f8e74ed43be1050e79b07a63cc47ad096915ec0
iscsi-target: Fix potential dead-lock during node acl delete

Orabug: 23330764

[ Upstream commit 26a99c19f810b2593410899a5b304b21b47428a6 ]

This patch is a iscsi-target specific bug-fix for a dead-lock
that can occur during explicit struct se_node_acl->acl_group
se_session deletion via configfs rmdir(2), when iscsi-target
time2retain timer is still active.

It changes iscsi-target to obtain se_portal_group->session_lock
internally using spin_in_locked() to check for the specific
se_node_acl configfs shutdown rmdir(2) case.

Note this patch is intended for stable, and the subsequent
v4.5-rc patch converts target_core_tpg.c to use proper
se_sess->sess_kref reference counting for both se_node_acl
deletion + se_node_acl->queue_depth se_session restart.

Reported-by:: Sagi Grimberg <sagig@mellanox.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 5446a444ae9e1976a77cb8faeab8198e44168daa)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/target/iscsi/iscsi_target_configfs.c