diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index 4dc07f0b4..58ba36dfd 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -2035,6 +2035,8 @@ static int scsi_cmnd_start(struct iscsi_cmnd *req) atomic_inc(&session->active_cmds); req->dec_active_cmds = 1; + sBUG_ON(session->scst_sess == NULL); + scst_cmd = scst_rx_cmd(session->scst_sess, (uint8_t *)&req_hdr->lun, sizeof(req_hdr->lun), req_hdr->scb, sizeof(req_hdr->scb), SCST_NON_ATOMIC); diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index ab8b2aa16..c856f15d5 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -1271,7 +1271,7 @@ static void isert_kref_free(struct kref *kref) TRACE_ENTRY(); - pr_info("isert_conn_free conn:%p\n", isert_conn); + pr_info("%s conn:%p\n", __func__, isert_conn); isert_free_conn_resources(isert_conn); @@ -1306,6 +1306,7 @@ static void isert_kref_free(struct kref *kref) void isert_conn_free(struct isert_connection *isert_conn) { + sBUG_ON(atomic_read(&isert_conn->kref.refcount) == 0); kref_put(&isert_conn->kref, isert_kref_free); }