From patchwork Fri Nov 23 14:26:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herton Ronaldo Krzesinski X-Patchwork-Id: 201329 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 790412C008D for ; Sat, 24 Nov 2012 01:26:49 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TbuDG-00062y-Aj; Fri, 23 Nov 2012 14:26:38 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TbuDA-00062d-MQ for kernel-team@lists.ubuntu.com; Fri, 23 Nov 2012 14:26:32 +0000 Received: from [177.96.82.92] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TbuD9-0002tl-8S; Fri, 23 Nov 2012 14:26:31 +0000 From: Herton Ronaldo Krzesinski To: Nicholas Bellinger Subject: [ 3.5.yuz extended stable ] Patch "target: Re-add explict zeroing of INQUIRY bounce buffer" has been added to staging queue Date: Fri, 23 Nov 2012 12:26:27 -0200 Message-Id: <1353680787-4396-1-git-send-email-herton.krzesinski@canonical.com> X-Mailer: git-send-email 1.7.9.5 Cc: Kelsey Prantis , stable@vger.kernel.org, kernel-team@lists.ubuntu.com, Paolo Bonzini , Andy Grover X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled target: Re-add explict zeroing of INQUIRY bounce buffer to the linux-3.5.y-queue branch of the 3.5.yuz extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.5.yuz tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Herton ------ From 0d32695d8203dad57dcbdc2d7cb91a99b2725185 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Wed, 31 Oct 2012 22:04:26 -0700 Subject: [PATCH 1/5] target: Re-add explict zeroing of INQUIRY bounce buffer memory commit dea5f0998aa82bdeca260b87c653db11e91329b2 upstream. This patch fixes a regression in spc_emulate_inquiry() code where the local scope bounce buffer was no longer getting it's memory zeroed, causing various problems with SCSI initiators that depend upon areas of INQUIRY EVPD=0x83 payload having been zeroed. This bug was introduced with the following v3.7-rc1 patch + CC'ed stable commit: commit ffe7b0e9326d9c68f5688bef691dd49f1e0d3651 Author: Paolo Bonzini Date: Fri Sep 7 17:30:38 2012 +0200 target: support zero allocation length in INQUIRY Go ahead and re-add the missing memset of bounce buffer memory to be copied into the outgoing se_cmd descriptor kmapped SGL payload. Reported-by: Kelsey Prantis Cc: Kelsey Prantis Cc: Paolo Bonzini Cc: Andy Grover Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger [ herton: code to be patched is in target_core_cdb.c on 3.5 ] Signed-off-by: Herton Ronaldo Krzesinski --- drivers/target/target_core_cdb.c | 2 ++ 1 file changed, 2 insertions(+) -- 1.7.9.5 diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c index 3dc3393..dd09f0f 100644 --- a/drivers/target/target_core_cdb.c +++ b/drivers/target/target_core_cdb.c @@ -610,6 +610,8 @@ int target_emulate_inquiry(struct se_cmd *cmd) unsigned char buf[SE_INQUIRY_BUF]; int p, ret; + memset(buf, 0, SE_INQUIRY_BUF); + if (dev == tpg->tpg_virt_lun0.lun_se_dev) buf[0] = 0x3f; /* Not connected */ else