From 99f8c067e675c337b79ffe7d6613bbf5acdfbafe Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Mon, 7 Jul 2014 06:17:07 +0000 Subject: [PATCH] Correction to r268356: collide only sessions to the same target. --- sys/cam/ctl/ctl_frontend_iscsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index c7c9c27b18b1..caf3af11b4fa 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -1507,6 +1507,8 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) mtx_lock(&softc->lock); TAILQ_FOREACH(cs2, &softc->sessions, cs_next) { if (cs2 != cs && cs2->cs_tasks_aborted == false && + cs->cs_target == cs2->cs_target && + cs->cs_portal_group_tag == cs2->cs_portal_group_tag && strcmp(cs->cs_initiator_id, cs2->cs_initiator_id) == 0) { cfiscsi_session_terminate(cs2); mtx_unlock(&softc->lock);