Skip to content

Commit

Permalink
target: Fix incorrect se_cmd assignment in core_tmr_drain_tmr_list
Browse files Browse the repository at this point in the history
This patch fixes a bug in core_tmr_drain_tmr_list() where drain_tmr_list
was using the wrong se_tmr_req for cmd assignment due to a typo during the
LUN_RESET re-org.  This was resulting in general protection faults while
using the leftover bogus *tmr_p pointer from list_for_each_entry_safe().

Signed-off-by: Joern Engel <joern@logfs.org>
Cc: Joern Engel <joern@logfs.org>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Joern Engel authored and Nicholas Bellinger committed Oct 27, 2011
1 parent f147abb commit 80ccbc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_tmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void core_tmr_drain_tmr_list(
while (!list_empty(&drain_tmr_list)) {
tmr = list_entry(drain_tmr_list.next, struct se_tmr_req, tmr_list);
list_del(&tmr->tmr_list);
cmd = tmr_p->task_cmd;
cmd = tmr->task_cmd;

pr_debug("LUN_RESET: %s releasing TMR %p Function: 0x%02x,"
" Response: 0x%02x, t_state: %d\n",
Expand Down

0 comments on commit 80ccbc8

Please sign in to comment.