aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-08-15 01:38:30 -0500
committerJames Bottomley <jejb@mulgrave.localdomain>2007-08-15 13:09:21 -0500
commit6724add1b5cfb020ba8f5532efe430d1ccd5fc30 (patch)
tree4c1f0de4c56835934d844ac20cc42a54ee19ce6f /include/scsi
parent[SCSI] libiscsi: fix null ptr regression when aborting a command with data to transfer (diff)
downloadlinux-dev-6724add1b5cfb020ba8f5532efe430d1ccd5fc30.tar.xz
linux-dev-6724add1b5cfb020ba8f5532efe430d1ccd5fc30.zip
[SCSI] libiscsi: sync up iscsi and scsi eh's access to the connection
The iscsi eh could be tearing down the session/connection while the scsi eh is still sending task management functions. If when we drop the session lock to grab the recv lock, the iscsi eh tears down the connection we will oops. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libiscsi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 007d442412e2..b4b31132618b 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -205,6 +205,13 @@ struct iscsi_queue {
};
struct iscsi_session {
+ /*
+ * Syncs up the scsi eh thread with the iscsi eh thread when sending
+ * task management functions. This must be taken before the session
+ * and recv lock.
+ */
+ struct mutex eh_mutex;
+
/* iSCSI session-wide sequencing */
uint32_t cmdsn;
uint32_t exp_cmdsn;