aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2011-02-16 16:04:33 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-24 12:41:05 -0500
commit22a39fbbfecfea703b686a4626a631d706ccb3ee (patch)
treed3d13184d9412310a6db0f9ae4423fd881a302cf /include/scsi
parentfdafd4dfc7bbdd40a4692192b77299b28c8a948f (diff)
[SCSI] iscsi: fix iscsi_endpoint leak
When iscsid restarts it does not know the connection's endpoint, so it is getting leaked. This fixes the problem by having the iscsi class force a disconnect before a new connection is bound. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_transport_iscsi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 7fff94b3b2a8..b9ba349ef257 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -160,6 +160,8 @@ struct iscsi_cls_conn {
160 void *dd_data; /* LLD private data */ 160 void *dd_data; /* LLD private data */
161 struct iscsi_transport *transport; 161 struct iscsi_transport *transport;
162 uint32_t cid; /* connection id */ 162 uint32_t cid; /* connection id */
163 struct mutex ep_mutex;
164 struct iscsi_endpoint *ep;
163 165
164 int active; /* must be accessed with the connlock */ 166 int active; /* must be accessed with the connlock */
165 struct device dev; /* sysfs transport/container device */ 167 struct device dev; /* sysfs transport/container device */
@@ -222,6 +224,7 @@ struct iscsi_endpoint {
222 void *dd_data; /* LLD private data */ 224 void *dd_data; /* LLD private data */
223 struct device dev; 225 struct device dev;
224 uint64_t id; 226 uint64_t id;
227 struct iscsi_cls_conn *conn;
225}; 228};
226 229
227/* 230/*