mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 05:31:28 +00:00
isert: fix fops ioctl using invalid conn
On teardown flow we need to set dev conn state to disconnected. Signed-off-by: Israel Rukshin <israelr@mellanox.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6939 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -78,6 +78,11 @@ static void isert_mark_conn_closed(struct iscsi_conn *conn, int flags)
|
||||
|
||||
static void isert_close_conn(struct iscsi_conn *conn, int flags)
|
||||
{
|
||||
struct isert_conn_dev *dev;
|
||||
|
||||
dev = isert_get_priv(conn);
|
||||
if (dev)
|
||||
dev->state = CS_DISCONNECTED;
|
||||
}
|
||||
|
||||
static int isert_receive_cmnd_data(struct iscsi_cmnd *cmnd)
|
||||
|
||||
@@ -211,6 +211,13 @@ int isert_conn_alloc(struct iscsi_session *session,
|
||||
|
||||
dev = filp->private_data;
|
||||
|
||||
if (unlikely(dev->state == CS_DISCONNECTED)) {
|
||||
res = -EBADF;
|
||||
goto out;
|
||||
}
|
||||
|
||||
sBUG_ON(dev->state != CS_RSP_FINISHED);
|
||||
|
||||
cmnd = dev->login_rsp;
|
||||
|
||||
sBUG_ON(cmnd == NULL);
|
||||
|
||||
Reference in New Issue
Block a user