summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0057-tcm_fc-Fix-crash-seen-with-aborts-and-large-reads.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0057-tcm_fc-Fix-crash-seen-with-aborts-and-large-reads.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0057-tcm_fc-Fix-crash-seen-with-aborts-and-large-reads.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0057-tcm_fc-Fix-crash-seen-with-aborts-and-large-reads.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0057-tcm_fc-Fix-crash-seen-with-aborts-and-large-reads.patch
new file mode 100644
index 00000000..eb1e62d2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0057-tcm_fc-Fix-crash-seen-with-aborts-and-large-reads.patch
@@ -0,0 +1,39 @@
1From f846f3528f3dcd02646a919a50696d026e0864ae Mon Sep 17 00:00:00 2001
2From: Mark Rustad <mark.d.rustad@intel.com>
3Date: Fri, 13 Jul 2012 18:18:04 -0700
4Subject: [PATCH 057/109] tcm_fc: Fix crash seen with aborts and large reads
5
6commit 3cc5d2a6b9a2fd1bf024aa5e52dd22961eecaf13 upstream.
7
8This patch fixes a crash seen when large reads have their exchange
9aborted by either timing out or being reset. Because the exchange
10abort results in the seq pointer being set to NULL, because the
11sequence is no longer valid, it must not be dereferenced. This
12patch changes the function ft_get_task_tag to return ~0 if it is
13unable to get the tag for this reason. Because the get_task_tag
14interface provides no means of returning an error, this seems
15like the best way to fix this issue at the moment.
16
17Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
18Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
19Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
20---
21 drivers/target/tcm_fc/tfc_cmd.c | 2 ++
22 1 files changed, 2 insertions(+), 0 deletions(-)
23
24diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
25index d95cfe2..278819c 100644
26--- a/drivers/target/tcm_fc/tfc_cmd.c
27+++ b/drivers/target/tcm_fc/tfc_cmd.c
28@@ -249,6 +249,8 @@ u32 ft_get_task_tag(struct se_cmd *se_cmd)
29 {
30 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd);
31
32+ if (cmd->aborted)
33+ return ~0;
34 return fc_seq_exch(cmd->seq)->rxid;
35 }
36
37--
381.7.7.6
39