diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2007-08-15 02:38:30 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-08-15 14:09:21 -0400 |
commit | 6724add1b5cfb020ba8f5532efe430d1ccd5fc30 (patch) | |
tree | 4c1f0de4c56835934d844ac20cc42a54ee19ce6f /include/scsi | |
parent | 96809f1b15eddae2325b2ab78e6f931edc969074 (diff) |
[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.h | 7 |
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 { | |||
205 | }; | 205 | }; |
206 | 206 | ||
207 | struct iscsi_session { | 207 | struct iscsi_session { |
208 | /* | ||
209 | * Syncs up the scsi eh thread with the iscsi eh thread when sending | ||
210 | * task management functions. This must be taken before the session | ||
211 | * and recv lock. | ||
212 | */ | ||
213 | struct mutex eh_mutex; | ||
214 | |||
208 | /* iSCSI session-wide sequencing */ | 215 | /* iSCSI session-wide sequencing */ |
209 | uint32_t cmdsn; | 216 | uint32_t cmdsn; |
210 | uint32_t exp_cmdsn; | 217 | uint32_t exp_cmdsn; |