]> git.karo-electronics.de Git - karo-tx-linux.git/commit
target: Fix task->task_execute_queue=1 clear bug + LUN_RESET OOPs
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 20 May 2011 03:19:12 +0000 (20:19 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 00:32:05 +0000 (09:32 +0900)
commit9d6b9519ace96a810c5ebe316f1301ca8be94d92
tree1e940d2c0d4a8cc3cf8c03cf0506b7633fdeeda7
parentc20bc94058d10ee00a72490e05b9c314f2a75d4e
target: Fix task->task_execute_queue=1 clear bug + LUN_RESET OOPs

commit af57c3ac9947990da2608561b71f4799eb7795c6 upstream.

This patch fixes a bug where task->task_execute_queue=1 was not being
cleared once se_task had been removed from se_device->execute_task_list,
resulting in an OOPs in core_tmr_lun_reset() for the task->task_active=0
case where transport_remove_task_from_execute_queue() was incorrectly
being called.

This patch fixes two cases in transport_get_task_from_execute_queue()
and transport_remove_task_from_execute_queue() to properly clear
task->task_execute_queue=0 once list_del(&task->t_execute_list) has
been called.

It also adds an explict check in transport_remove_task_from_execute_queue()
to dump_stack + return if called with task->task_execute_queue=0.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/target/target_core_transport.c