Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp362634yba; Sat, 13 Apr 2019 02:59:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaKdvAbQAGVoEaiQz0tvbXNbWG27XwqQob5GMy8ob/PNpXGAGqutfl0gUgoeCoZ7w4DHpl X-Received: by 2002:aa7:9151:: with SMTP id 17mr62595060pfi.192.1555149598535; Sat, 13 Apr 2019 02:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555149598; cv=none; d=google.com; s=arc-20160816; b=Qeu0jGRJxDa3V5edwFltTmffoUd2q1oN6Lqzhui1M0RA6zwkp2qbrzk3yxeuYs62mu zvnrw+hjD6XH4XAOKRtI1DzOkQz4q+8ssgbcWDiePEpF4oRwXa27fIqTO9iLVx31SAhy 0wwhStkYZQDosP00x8JYRH6XfOxnjQEhUpQSu4PHMdeXPkwA9Wi/oio9oOPZWmfhSuSb OS0+KZECdJQsSqoEPRu0zulPr1PjEjVGf2H0TelzWjEbj5QqhX8AzsMB9oylD5az4jeO g4bNMUK3geJ90pAKfg1J415oOudHTXaDnWXS7r/UjvNq3SbIBO+80/LT4wuumG1EbUpP 9l6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:cc:to:from:subject:message-id:dkim-signature:dkim-signature; bh=EMJhZtHrfk4Q9CGDbo+rW8Uig8kD7eXwbjaWww9BFh4=; b=itSGWhF35Br2ML5aWL2m8+ZMa4pCW72eA448BwFVrloutTPMoNALiHePrWXFQRsIni 0KKIph/vnSY/CPfHAK0GOK5YFnhlM+zrtAkZ2k7ojRijnMblT1ErGn392k6E8yc75jR3 6nH9soe1hp840PWK3E14tBVEMPvlM9EXqOf6mWCGP6t23Moi8G/2dgS79dB+j1tpdhNE 0gDWx2/Y/D6WDAfgJbsU3gDa9scNIREDVxGE9l0/clMPFrNi+Sav+kmyRHmxR3s+Ap+E M525MdM2djMzB5BVabiMdhhsVAmlXJbSuYwl0ClavprhSMVZEEygLsvSk7XovGycDVBc X8eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=kDX5G9Yx; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=rHxcN80G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si37314710pgv.493.2019.04.13.02.59.42; Sat, 13 Apr 2019 02:59:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=kDX5G9Yx; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=rHxcN80G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727011AbfDMJ7H (ORCPT + 99 others); Sat, 13 Apr 2019 05:59:07 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:50902 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfDMJ7H (ORCPT ); Sat, 13 Apr 2019 05:59:07 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 0E17D8EE0CF; Sat, 13 Apr 2019 02:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1555149547; bh=EOYJpO+6PIi+mhdtKMaJuiSVJkC2oE+YZVU0Xw4sUWE=; h=Subject:From:To:Cc:Date:From; b=kDX5G9Yx4EY+PLuSM/UNXUAlsWRf+VVi+P8jBSkrHddI+cZ1zZXru6NWT2bIQeZV7 HTb3qvzUIilKpRJ5xX12C7y411iOx1vui0zCet3SaywqqFtxr4zAmTcAIZH4uPuD9r jo9WaFeSEKEtLNzoYiAyF1LBlPAezHegRaAA73Js= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dsWghZPIQJWt; Sat, 13 Apr 2019 02:59:06 -0700 (PDT) Received: from [10.130.243.102] (unknown [195.77.194.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id D5AC98EE062; Sat, 13 Apr 2019 02:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1555149546; bh=EOYJpO+6PIi+mhdtKMaJuiSVJkC2oE+YZVU0Xw4sUWE=; h=Subject:From:To:Cc:Date:From; b=rHxcN80Gua7NUeIZ4F74HFqC7OxznYwCsLp+vA8O95ZBcDrMILCo2FTDJkUTBjjpV 6CS+Gpequ+rJ3a/e5VguQX1fFh6iYlWMDg63XOtSIJOnO79ZIPr2yy2dcBiI0tpTdr WoSTntbmlbPEd1HyF3OOVCRqsorMWwVlPQK7DtAM= Message-ID: <1555149542.2995.15.camel@HansenPartnership.com> Subject: [GIT PULL] SCSI fixes for 5.1-rc4 From: James Bottomley To: Andrew Morton , Linus Torvalds Cc: linux-scsi , linux-kernel Date: Sat, 13 Apr 2019 11:59:02 +0200 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org One obvious fix for a ciostor data corruption on error bug. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Varun Prakash (1): scsi: csiostor: fix missing data copy in csio_scsi_err_handler() And the diffstat: drivers/scsi/csiostor/csio_scsi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) With full diff below. James --- diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index 462560b2855e..469d0bc9f5fe 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c @@ -1713,8 +1713,11 @@ csio_scsi_err_handler(struct csio_hw *hw, struct csio_ioreq *req) } out: - if (req->nsge > 0) + if (req->nsge > 0) { scsi_dma_unmap(cmnd); + if (req->dcopy && (host_status == DID_OK)) + host_status = csio_scsi_copy_to_sgl(hw, req); + } cmnd->result = (((host_status) << 16) | scsi_status); cmnd->scsi_done(cmnd);