diff options
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.patch | 39 |
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 @@ | |||
1 | From f846f3528f3dcd02646a919a50696d026e0864ae Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Rustad <mark.d.rustad@intel.com> | ||
3 | Date: Fri, 13 Jul 2012 18:18:04 -0700 | ||
4 | Subject: [PATCH 057/109] tcm_fc: Fix crash seen with aborts and large reads | ||
5 | |||
6 | commit 3cc5d2a6b9a2fd1bf024aa5e52dd22961eecaf13 upstream. | ||
7 | |||
8 | This patch fixes a crash seen when large reads have their exchange | ||
9 | aborted by either timing out or being reset. Because the exchange | ||
10 | abort results in the seq pointer being set to NULL, because the | ||
11 | sequence is no longer valid, it must not be dereferenced. This | ||
12 | patch changes the function ft_get_task_tag to return ~0 if it is | ||
13 | unable to get the tag for this reason. Because the get_task_tag | ||
14 | interface provides no means of returning an error, this seems | ||
15 | like the best way to fix this issue at the moment. | ||
16 | |||
17 | Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> | ||
18 | Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> | ||
19 | Signed-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 | |||
24 | diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c | ||
25 | index 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 | -- | ||
38 | 1.7.7.6 | ||
39 | |||