From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:43275 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791AbbEBRSq (ORCPT ); Sat, 2 May 2015 13:18:46 -0400 Subject: Patch "IB/iser: Fix wrong calculation of protection buffer length" has been added to the 4.0-stable tree To: sagig@mellanox.com, dledford@redhat.com, gregkh@linuxfoundation.org Cc: , From: Date: Sat, 02 May 2015 19:18:01 +0200 Message-ID: <1430587081174219@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From a065fe6aa25ba6ba93c02dc13486131bb3c64d5f Mon Sep 17 00:00:00 2001 From: Sagi Grimberg Date: Tue, 14 Apr 2015 18:08:13 +0300 Subject: IB/iser: Fix wrong calculation of protection buffer length From: Sagi Grimberg 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') Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/ulp/iser/iser_initiator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -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 sagig@mellanox.com 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