From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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. 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> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: 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: >=20 > blk_peek_request: bad return=3D-22 >=20 > 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 =