]> git.baikalelectronics.ru Git - kernel.git/commit
tcm_fc: Add abort flag for gracefully handling exchange timeout
authorMark Rustad <mark.d.rustad@intel.com>
Tue, 3 Apr 2012 17:24:41 +0000 (10:24 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 7 Apr 2012 01:56:43 +0000 (18:56 -0700)
commit60ccd13b60b29cfa0a156fd9237b9af5470541c4
treef747aea02b1e52b14ba89bd7606cd4d8bdccc279
parent23483fa309e02a0d8c26b9756cf0d50b8a9df655
tcm_fc: Add abort flag for gracefully handling exchange timeout

Add abort flag and use it to terminate processing when an exchange
is timed out or is reset. The abort flag is used in place of the
transport_generic_free_cmd function call in the reset and timeout
cases, because calling that function in that context would free
memory that was in use. The aborted flag allows the lifetime to
be managed in a more normal way, while truncating the processing.

This change eliminates a source of memory corruption which
manifested in a variety of ugly ways.

(nab: Drop unused struct fc_exch *ep in ft_recv_seq)

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