[stgt] [PATCH] iser: Don't wait until iser_ib_init to init list_heads
Roi Dayan
roid at mellanox.com
Sun Aug 25 11:36:19 CEST 2013
Thanks Andy.
I saw there is another issue after the assert trying to clean IB resources even if were not allocated.
I'll send a patch over this one.
Thanks,
Roi
-----Original Message-----
From: Andy Grover [mailto:agrover at redhat.com]
Sent: Tuesday, August 20, 2013 3:33 AM
To: stgt at vger.kernel.org
Cc: Roi Dayan
Subject: [PATCH] iser: Don't wait until iser_ib_init to init list_heads
iser_ib_init exits before initializing list heads if no IB present. This will cause assert to fire.
see https://bugzilla.redhat.com/show_bug.cgi?id=995750
Signed-off-by: Andy Grover <agrover at redhat.com>
---
usr/iscsi/iser.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/usr/iscsi/iser.c b/usr/iscsi/iser.c index be2afeb..019eaf0 100644
--- a/usr/iscsi/iser.c
+++ b/usr/iscsi/iser.c
@@ -56,13 +56,13 @@ static struct rdma_event_channel *rdma_evt_channel; static struct rdma_cm_id *cma_listen_id;
/* accepted at RDMA layer, but not yet established */ -static struct list_head temp_conn;
+static LIST_HEAD(temp_conn);
/* all devices */
-static struct list_head iser_dev_list;
+static LIST_HEAD(iser_dev_list);
/* all iser connections */
-static struct list_head iser_conn_list;
+static LIST_HEAD(iser_conn_list);
#define uint64_from_ptr(p) (uint64_t)(uintptr_t)(p) #define ptr_from_int64(p) (void *)(unsigned long)(p) @@ -3389,10 +3389,6 @@ static int iser_ib_init(void)
if (err)
return err;
- INIT_LIST_HEAD(&iser_dev_list);
- INIT_LIST_HEAD(&iser_conn_list);
- INIT_LIST_HEAD(&temp_conn);
-
return err;
}
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list