Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754757AbdDMPQ1 (ORCPT ); Thu, 13 Apr 2017 11:16:27 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:46663 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754488AbdDMPQY (ORCPT ); Thu, 13 Apr 2017 11:16:24 -0400 X-IronPort-AV: E=Sophos;i="5.37,194,1488816000"; d="scan'208";a="10827632" From: Bart Van Assche To: "jejb@linux.vnet.ibm.com" , "jthumshirn@suse.de" , "martin.petersen@oracle.com" CC: "hch@lst.de" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "hare@suse.de" , "stable@vger.kernel.org" Subject: Re: [PATCH v2] scsi: return correct blkprep status code in case scsi_init_io() fails. Thread-Topic: [PATCH v2] scsi: return correct blkprep status code in case scsi_init_io() fails. Thread-Index: AQHSs12y3qDPNkk5PUCvPPN2BQmQRKHDaw4A Date: Thu, 13 Apr 2017 15:16:19 +0000 Message-ID: <1492096576.3298.2.camel@sandisk.com> References: <20170412072119.7529-1-jthumshirn@suse.de> In-Reply-To: <20170412072119.7529-1-jthumshirn@suse.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.vnet.ibm.com; dkim=none (message not signed) header.d=none;linux.vnet.ibm.com; dmarc=none action=none header.from=sandisk.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [63.163.107.100] x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1535;7:jRrpLGNssLArtI8pKRIMMo+r/DSU/cra1O4mRdYkTnMZuB/lDmCal6KdaDjRDBpccWLEgu+nFFfPlvyd5XqFTtUxjzSmhuhk+Cmwly2r9Hr/FI0RKXQsNuhxOjw2PmPdpfCZd9p1HfL7leaF7fjHU0HONxk/koNiiViexZu7BaEXZv+XQxMTt4PDgVFYcjqYAeLToZmr96gfCqtw2G3lUSE7bLqMgn27xRj292q37KnOEbpmJVBjaNpLYvVvHgbq8Fv8mhIiRsKgmXAXv6FsO/lrQCRIODsnyIEhJrkLUj26w4e6cT8Nn8VCZYzdthVlOENt0bqWU03nf/GBg8h04A==;20:V5NrjPotLD72MYIXiGZmzX4zt0wnU9UaHC+7iQFK8eOJzyHPSuauca8rods4OFy5GAtHj1zNX49wkz7C4f9wd9P+tZBNCYND+vUoNwEHvx7B6+n77v/BNUFPNvFKeIJAtWZIWRZjOXoOk1gSe9pLWdvp0nJ104qR9vI2hGLR008= x-ms-office365-filtering-correlation-id: 7db5385f-639e-4812-8ad7-08d482800992 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:CY1PR0401MB1535; wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(42932892334569); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123564025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148);SRVR:CY1PR0401MB1535;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0401MB1535; x-forefront-prvs: 02760F0D1C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39450400003)(39850400002)(39860400002)(39410400002)(39840400002)(377424004)(24454002)(54356999)(76176999)(38730400002)(50986999)(3280700002)(3660700001)(3846002)(6116002)(102836003)(2900100001)(4326008)(53936002)(54906002)(25786009)(6512007)(2501003)(77096006)(575784001)(6486002)(86362001)(99286003)(2201001)(103116003)(8936002)(229853002)(66066001)(36756003)(305945005)(5660300001)(6436002)(7736002)(122556002)(189998001)(33646002)(81166006)(6246003)(6506006)(8676002)(2950100002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1535;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: MIME-Version: 1.0 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2017 15:16:19.3465 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1535 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v3DFGVhi015233 Content-Length: 479 Lines: 12 On Wed, 2017-04-12 at 09:21 +0200, Johannes Thumshirn wrote: > When instrumenting the SCSI layer to run into the > !blk_rq_nr_phys_segments(rq) case the following warning emitted from the > block layer: > > blk_peek_request: bad return=-22 > > This happens because since commit fd3fc0b4d730 ('scsi: don't BUG_ON() > empty DMA transfers') we return the wrong error value from scsi_prep_fn() > back to the block layer. Reviewed-by: Bart Van Assche