From d45aab69a90cafc177554f15bcd5b490370b0724 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 21 Aug 2014 05:17:47 +0000 Subject: [PATCH] Fix incorrect address computation during receive PDUs preparations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found and fix suggested by Кирилл Тюшев git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5721 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index e1c278931..6bb89875a 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -1566,7 +1566,7 @@ static int cmnd_prepare_recv_pdu(struct iscsi_conn *conn, EXTRACHECKS_BUG_ON(addr == NULL); sg_len = sg[idx].offset + sg[idx].length - offset; - conn->read_iov[i].iov_base = addr + offset; + conn->read_iov[i].iov_base = addr + offset - sg[idx].offset; if (size <= sg_len) { TRACE_DBG("idx=%d, i=%d, offset=%u, size=%d, addr=%p",