diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2007-08-15 01:38:30 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-08-15 13:09:21 -0500 |
commit | 6724add1b5cfb020ba8f5532efe430d1ccd5fc30 (patch) | |
tree | 4c1f0de4c56835934d844ac20cc42a54ee19ce6f /include/scsi/libiscsi.h | |
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/libiscsi.h')
-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 { }; 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; |