Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305AbdDKSnc (ORCPT ); Tue, 11 Apr 2017 14:43:32 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:52843 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752236AbdDKSn1 (ORCPT ); Tue, 11 Apr 2017 14:43:27 -0400 X-IronPort-AV: E=Sophos;i="5.37,186,1488816000"; d="scan'208";a="9808491" From: Bart Van Assche To: "jejb@linux.vnet.ibm.com" , "jthumshirn@suse.de" , "martin.petersen@oracle.com" CC: "hch@lst.de" , "linux-kernel@vger.kernel.org" , "hare@suse.de" , "linux-scsi@vger.kernel.org" Subject: Re: [PATCH RESEND] scsi: return correct blkprep status code in case scsi_init_io() fails. Thread-Topic: [PATCH RESEND] scsi: return correct blkprep status code in case scsi_init_io() fails. Thread-Index: AQHSspgdiY6Yd/WXBE2wJp44l7ycfaHAgcoA Date: Tue, 11 Apr 2017 18:43:22 +0000 Message-ID: <1491936200.2654.18.camel@sandisk.com> References: <20170411074644.6071-1-jthumshirn@suse.de> In-Reply-To: <20170411074644.6071-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;CY1PR0401MB1534;7:WkvaZjuiOW2lr7eOeFWtNssRPw4hXInjhpup6ero6nIYg7NsBv0/Z8cUbf+RIj31yj7GT9wDaeDzjS5Rm66XOBbnn8KlBbXgBjCviFzj9dxzeug6IvuDP+wcK/wImSSSynowFMVk7zvZzITbPKCK7zbokgH0add2uLUr3KsLq6dgqDXvheQ6j/PPh3+Y8PEPsCUHNQ58o3IGZAbIPrnVlm4c1AkoQzD8E3zSBJ8dI0S1vegTtWJzhlHGhZ0pXWXJpX4HZa+9I7LX+O8kRzsx4YrYAR+v6Y4XnXk6Z1SFVgUvqDMp2E/WtBMXG2++mAiMoPpg1Pf5jsd4liVzNwUMAQ==;20:gfjDDWkymIOYSWV6O5ar8VWioHPdl7axq4UuvHN9ifBYTxfOMiRuh8tmGb7gipUe16/fzu3qFTxgG9QFxWlDM71j729L79zeIUF7dB56G+JKy1j82Zxe23wrJrd1Daqg31HA33w2AARTkSLloYDmEkwybSgaHexuj4wKqZwAb+8= x-ms-office365-filtering-correlation-id: 009dc87e-1a00-4b90-57eb-08d4810aa199 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:CY1PR0401MB1534; wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(6072148);SRVR:CY1PR0401MB1534;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0401MB1534; x-forefront-prvs: 0274272F87 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39840400002)(39860400002)(39410400002)(39400400002)(39850400002)(39450400003)(24454002)(377424004)(122556002)(305945005)(81166006)(66066001)(6512007)(77096006)(38730400002)(53936002)(4326008)(8936002)(189998001)(3660700001)(8676002)(6486002)(7736002)(575784001)(86362001)(6436002)(229853002)(2201001)(2900100001)(50986999)(54356999)(2501003)(76176999)(102836003)(3846002)(54906002)(103116003)(6116002)(5660300001)(2950100002)(99286003)(2906002)(3280700002)(36756003)(33646002)(25786009)(6246003)(6506006);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1534;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: <49A7269491C3D94DB3E4901E387E0B6D@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2017 18:43:22.5949 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1534 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 v3BIhZ4V016408 Content-Length: 907 Lines: 25 On Tue, 2017-04-11 at 09:46 +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 iscsi_prep_fn() ^^^^^^^^^^^^^^^ There is no?iscsi_prep_fn() in the kernel tree. Did you perhaps mean scsi_prep_fn()? > back to the block layer. > > Signed-off-by: Johannes Thumshirn > Fixes: fd3fc0b4d730 scsi: don't BUG_ON() empty DMA transfers > Reviewed-by: Christoph Hellwig Commit fd3fc0b4d730 has a "Cc: stable" tag. I assume that that means that this patch also needs that tag? Otherwise this patch looks fine to me. Bart.