Skip to contentSkip to conversation

Patch "IB/iser: Fix wrong calculation of protection buffer length" has been added to the 4.0-stable tree

PATCH [email protected] 1 participant 1 message May 2, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

IB/iser: Fix wrong calculation of protection buffer length

to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ib-iser-fix-wrong-calculation-of-protection-buffer-length.patch
and it can be found in the queue-4.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a065fe6aa25ba6ba93c02dc13486131bb3c64d5f Mon Sep 17 00:00:00 2001

From: Sagi Grimberg <[email protected]>
Date: Tue, 14 Apr 2015 18:08:13 +0300
Subject: IB/iser: Fix wrong calculation of protection buffer length

From: Sagi Grimberg <[email protected]>

commit a065fe6aa25ba6ba93c02dc13486131bb3c64d5f upstream.

This length miss-calculation may cause a silent data corruption in the DIX case and cause the device to reference unmapped area.

Fixes d77e65350f2d ('libiscsi, iser: Adjust data_length to include protection information')
---
 drivers/infiniband/ulp/iser/iser_initiator.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/ulp/iser/iser_initiator.c +2 -2
@@ -409,8 +409,8 @@ int iser_send_command(struct iscsi_conn
 	if (scsi_prot_sg_count(sc)) {
 		prot_buf->buf  = scsi_prot_sglist(sc);
 		prot_buf->size = scsi_prot_sg_count(sc);
-		prot_buf->data_len = data_buf->data_len >>
-				     ilog2(sc->device->sector_size) * 8;
+		prot_buf->data_len = (data_buf->data_len >>
+				     ilog2(sc->device->sector_size)) * 8;
 	}
 
 	if (hdr->flags & ISCSI_FLAG_CMD_READ) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.0/target-file-fix-bug-when-config_debug_sg-y-and-dif-protection-enabled.patch queue-4.0/ib-core-don-t-disallow-registering-region-starting-at-0x0.patch queue-4.0/target-file-fix-unmap-with-dif-protection-support.patch queue-4.0/iser-target-fix-session-hang-in-case-of-an-rdma-read-dif-error.patch queue-4.0/iscsi-target-convert-iscsi_thread_set-usage-to-kthread.h.patch queue-4.0/sd-unregister-integrity-profile.patch queue-4.0/target-file-fix-sg-table-for-prot_buf-initialization.patch queue-4.0/iser-target-fix-possible-deadlock-in-rdma_cm-connection-error.patch queue-4.0/sd-fix-missing-ato-tag-check.patch queue-4.0/ib-iser-fix-wrong-calculation-of-protection-buffer-length.patch