]> git.baikalelectronics.ru Git - kernel.git/commit
tcm_fc: Fix crash seen with aborts and large reads
authorMark Rustad <mark.d.rustad@intel.com>
Sat, 14 Jul 2012 01:18:04 +0000 (18:18 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 14 Jul 2012 22:17:29 +0000 (15:17 -0700)
commite1b5474f160d63e2b70973b9f74c2a99ffa1a773
treebd6f7671abd342573227645906031719978e71ef
parentb2c25508d9434ba65d87d6a0f8397bc8a8e82d1d
tcm_fc: Fix crash seen with aborts and large reads

This patch fixes a crash seen when large reads have their exchange
aborted by either timing out or being reset. Because the exchange
abort results in the seq pointer being set to NULL, because the
sequence is no longer valid, it must not be dereferenced. This
patch changes the function ft_get_task_tag to return ~0 if it is
unable to get the tag for this reason. Because the get_task_tag
interface provides no means of returning an error, this seems
like the best way to fix this issue at the moment.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/tcm_fc/tfc_cmd.c