diff options
author | Kiran Patil <kiran.patil@intel.com> | 2011-06-22 19:30:22 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-06-23 20:09:15 -0400 |
commit | 61db952713a8bc1b18515db3f2eac354ec8990bd (patch) | |
tree | 94495bc24648a2990b39baf8c865fe0c36ccc9bf /drivers/target/tcm_fc/tcm_fc.h | |
parent | 60d645a4e9e7e7ddc20e534fea82aa4e6947f911 (diff) |
tcm_fc: Fix ft_send_tm LUN lookup OOPs
This patch fixes a bug in ft_send_tm() that was incorrectly calling
ft_get_lun_for_cmd() -> transport_get_lun_for_cmd(), instead of using
transport_get_lun_for_tmr() for the proper struct se_lun lookup
that was triggering an OOPs in the se_cmd->tmr_req failure path.
This patch fixes the issue by re-arranging the codepath where
transport_get_lun_for_tmr() is called after tmr request is allocated and
made it available as part of se_cmd.
It also drops the now unnecessary ft_get_lun_for_cmd() unpacking code, and
uses scsilun_to_int() directly ahead of transport_get_lun_for_cmd() and
transport_get_lun_for_tmr() usage.
Signed-off-by: Patil, Kiran <kiran.patil@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc/tcm_fc.h')
-rw-r--r-- | drivers/target/tcm_fc/tcm_fc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/tcm_fc/tcm_fc.h b/drivers/target/tcm_fc/tcm_fc.h index defff32b7880..7b82f1b7fef8 100644 --- a/drivers/target/tcm_fc/tcm_fc.h +++ b/drivers/target/tcm_fc/tcm_fc.h | |||
@@ -144,7 +144,7 @@ enum ft_cmd_state { | |||
144 | */ | 144 | */ |
145 | struct ft_cmd { | 145 | struct ft_cmd { |
146 | enum ft_cmd_state state; | 146 | enum ft_cmd_state state; |
147 | u16 lun; /* LUN from request */ | 147 | u32 lun; /* LUN from request */ |
148 | struct ft_sess *sess; /* session held for cmd */ | 148 | struct ft_sess *sess; /* session held for cmd */ |
149 | struct fc_seq *seq; /* sequence in exchange mgr */ | 149 | struct fc_seq *seq; /* sequence in exchange mgr */ |
150 | struct se_cmd se_cmd; /* Local TCM I/O descriptor */ | 150 | struct se_cmd se_cmd; /* Local TCM I/O descriptor */ |