Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2014 11:35:07 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271957 - head/sys/cam/ctl
Message-ID:  <201409221135.s8MBZ7CH029558@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.
 			 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409221135.s8MBZ7CH029558>