aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriel Nahum <arieln@mellanox.com>2014-10-01 07:02:06 -0400
committerRoland Dreier <roland@purestorage.com>2014-10-09 03:06:06 -0400
commitaea8f4df6da46add468c44875348e1045bffeeb7 (patch)
tree89f0812fa9da56f2e5f2fcd5d28624e68c47843c
parent8c204e69ced1a8c0d74f8b6d7a1393d055c5c4fa (diff)
IB/iser: Use iser_warn instead of BUG_ON in iser_conn_release
In case iscsid was violently killed (SIGKILL) during its error recovery stage, we may never get a connection teardown sequence for some of the old connections. No harm done, but when we try to unload the module we will need to cleanup all these connections. So we actually may end-up here - so it's not a BUG_ON(), just give a relaxed warning that this happened and continue with normal unload. BUG_ON() will cause segfault on module_exit and we don't want that. Signed-off-by: Ariel Nahum <arieln@mellanox.com> Signed-off-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r--drivers/infiniband/ulp/iser/iser_verbs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 35f53a3fdf21..57b20c691367 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -627,7 +627,9 @@ void iser_conn_release(struct iser_conn *iser_conn)
627 mutex_unlock(&ig.connlist_mutex); 627 mutex_unlock(&ig.connlist_mutex);
628 628
629 mutex_lock(&iser_conn->state_mutex); 629 mutex_lock(&iser_conn->state_mutex);
630 BUG_ON(iser_conn->state != ISER_CONN_DOWN); 630 if (iser_conn->state != ISER_CONN_DOWN)
631 iser_warn("iser conn %p state %d, expected state down.\n",
632 iser_conn, iser_conn->state);
631 /* 633 /*
632 * In case we never got to bind stage, we still need to 634 * In case we never got to bind stage, we still need to
633 * release IB resources (which is safe to call more than once). 635 * release IB resources (which is safe to call more than once).