Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2071152imm; Thu, 24 May 2018 05:23:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoYKnNuivNSDhFTsK/4q84U+oeNFwOeM6wTru+gDIQEgQhbNSq2Dg1XnSeGSCUxZWj0qCKh X-Received: by 2002:a17:902:543:: with SMTP id 61-v6mr7219802plf.47.1527164611460; Thu, 24 May 2018 05:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527164611; cv=none; d=google.com; s=arc-20160816; b=vTOVdTUs3ogVn5Ol8IJExuh6Lsre0BnfPBLsTYpM6/uCu3tnO0/HbRrf3cWwf/2i7N PCUTHqCI7ezhhKHtLILTdNl/2JO7ss5xAbZy2EmyblZMzhqk2qMjpPno6PA9xwr2DSYf 4ayjE/WsdmTmLJOmkytymTAnhQAZA8x+0zqS5kVYm+VJH6ImUsiXmV5Ifos3o9DOMTgD TDBP2p6Yv7iUeXUZwtcpARK6wYqnvqTHLnU/IDppCw506ADqeFgM4J0PUf7iPXv4I6ah RWap+iQUaDXkALmgtoLeAsukJUBUxjRLU9qr2aPewsuepZN6kKEsaPmsPiqvqxH8T0i+ uEQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=Hrim0uu89BOpTrZXc4em751xhHcHoSalidKvxT2TQZU=; b=NOLx7JVFQIELgkWtRsP/m2nF+YJuU5r6yQvh2GzeP8hezQqFiidL3/T9J5uYHYRXsd 2cd0AzKYGGoP4FYbJ9ZMa+GewrF8Entcuu4FhdpT+sDP5jBD0NfJ+fl6QPsXpGgQQ7Vg Cq/6sSoxMrnOj4aLD/CAR3sVBFW+dnvEYD+q0nvc0O3ehpYGEw2RgrUUv0nM8Xl13zeY efPy0WmnaCw9W5IyT7gc6TM5LssEMmMcg/p53Qw7YVCaA6sZoWypLpdFz2pUjB8jfLB0 17cFHUjATjDNIbFo3jWbFx4Lz8i2WF/1B9ve/fsnAtwyQWLfOGPnZP/5mmMFL+swpU3F q83w== ARC-Authentication-Results: i=1; mx.google.com; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69-v6si16543930pgc.64.2018.05.24.05.23.16; Thu, 24 May 2018 05:23:31 -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; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970037AbeEXMVi (ORCPT + 99 others); Thu, 24 May 2018 08:21:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33488 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S970029AbeEXMVc (ORCPT ); Thu, 24 May 2018 08:21:32 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4OCL4Eo054525 for ; Thu, 24 May 2018 08:21:31 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j5tesfr1s-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 24 May 2018 08:21:26 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 24 May 2018 13:19:34 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 24 May 2018 13:19:31 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4OCJUN065077376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 May 2018 12:19:30 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A76DDA4059; Thu, 24 May 2018 13:10:49 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53FB4A404D; Thu, 24 May 2018 13:10:49 +0100 (BST) Received: from oc3548334886.ibm.com (unknown [9.152.212.134]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 24 May 2018 13:10:49 +0100 (BST) Subject: Re: [PATCH 4.14 110/165] scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte() To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Bart Van Assche Cc: stable@vger.kernel.org, Doug Gilbert , Hannes Reinecke , "Martin K. Petersen" , Sasha Levin References: <20180524093621.979359379@linuxfoundation.org> <20180524093626.469402002@linuxfoundation.org> From: Steffen Maier Date: Thu, 24 May 2018 14:19:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180524093626.469402002@linuxfoundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18052412-0044-0000-0000-000005564100 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052412-0045-0000-0000-000028984420 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-24_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805240146 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hopefully I haven't missed it in the stable queue, but do we need the following on top (effectively not applying e39a97353e53)?: commit cbe095e2b584623b882ebaf6c18e0b9077baa3f7 Author: Bart Van Assche Date: Thu Apr 5 10:32:59 2018 -0700 Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()" The description of commit e39a97353e53 is wrong: it mentions that commit 2a842acab109 introduced a bug in __scsi_error_from_host_byte() although that commit did not change the behavior of that function. Additionally, commit e39a97353e53 introduced a bug: it causes commands that fail with hostbyte=DID_OK and driverbyte=DRIVER_SENSE to be completed with BLK_STS_OK. Hence revert that commit. Fixes: e39a97353e53 ("scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()") Reported-by: Damien Le Moal Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Douglas Gilbert Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Lee Duncan Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen On 05/24/2018 11:38 AM, Greg Kroah-Hartman wrote: > 4.14-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Hannes Reinecke > > [ Upstream commit e39a97353e5378eb46bf01679799c5704d397f32 ] > > When converting __scsi_error_from_host_byte() to BLK_STS error codes the > case DID_OK was forgotten, resulting in it always returning an error. > > Fixes: 2a842acab109 ("block: introduce new block status code type") > Cc: Doug Gilbert > Signed-off-by: Hannes Reinecke > Reviewed-by: Douglas Gilbert > Signed-off-by: Martin K. Petersen > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman > --- > drivers/scsi/scsi_lib.c | 2 ++ > 1 file changed, 2 insertions(+) > > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -720,6 +720,8 @@ static blk_status_t __scsi_error_from_ho > int result) > { > switch (host_byte(result)) { > + case DID_OK: > + return BLK_STS_OK; > case DID_TRANSPORT_FAILFAST: > return BLK_STS_TRANSPORT; > case DID_TARGET_FAILURE: > > -- Mit freundlichen Gruessen / Kind regards Steffen Maier Linux on IBM Z Development IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Geschaeftsfuehrung: Dirk Wittkopp Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294