From owner-svn-src-head@FreeBSD.ORG Mon Sep 22 11:35:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F5D6BD1; Mon, 22 Sep 2014 11:35:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2EB827; Mon, 22 Sep 2014 11:35:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8MBZ7TY029559; Mon, 22 Sep 2014 11:35:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8MBZ7CH029558; Mon, 22 Sep 2014 11:35:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409221135.s8MBZ7CH029558@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 22 Sep 2014 11:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271957 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2014 11:35:07 -0000 Author: mav Date: Mon Sep 22 11:35:06 2014 New Revision: 271957 URL: http://svnweb.freebsd.org/changeset/base/271957 Log: Fix read overrun handling, broken by using wrong variable. MFC after: 3 days Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Sep 22 11:08:22 2014 (r271956) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Sep 22 11:35:06 2014 (r271957) @@ -2505,10 +2505,10 @@ cfiscsi_datamove_in(union ctl_io *io) sg_addr += len; sg_len -= len; - KASSERT(buffer_offset + request->ip_data_len <= expected_len, + KASSERT(buffer_offset + response->ip_data_len <= expected_len, ("buffer_offset %zd + ip_data_len %zd > expected_len %zd", - buffer_offset, request->ip_data_len, expected_len)); - if (buffer_offset + request->ip_data_len == expected_len) { + buffer_offset, response->ip_data_len, expected_len)); + if (buffer_offset + response->ip_data_len == expected_len) { /* * Already have the amount of data the initiator wanted. */