[PATCH] uas: Unblock scsi-requests on failure to alloc streams in post_reset

2018-01-09 Thread Hans de Goede
If we return 1 from our post_reset handler, then our disconnect handler will be called immediately afterwards. Since pre_reset blocks all scsi requests our disconnect handler will then hang in the scsi_remove_host call. This is esp. bad because our disconnect handler hanging for ever also stops th

Re: [PATCH 2/4] block: Introduce blk_wait_if_quiesced() and blk_finish_wait_if_quiesced()

2018-01-09 Thread Bart Van Assche
On Tue, 2018-01-09 at 07:41 +0100, Hannes Reinecke wrote: > I'm always a bit cautious when having rcu_read_lock() and > rcu_read_unlock() in two separate functions. > Can we make this dependency more explicit by renaming the first function > to blk_start_wait_if_quiesced() and updating the comment

Re: [PATCH 13/14] megaraid_sas: NVME passthru command support

2018-01-09 Thread Keith Busch
On Tue, Jan 09, 2018 at 03:50:44PM -0500, Douglas Gilbert wrote: > Have you tried to do any serious work with and > say compared it with FreeBSD and Microsoft's approach? No prize for > guessing which one is worst (and least extensible). Looks like the > Linux pass-through was at the end of a ToDo

RE: [PATCH] storvsc: do not assume SG list is continuous when doing bounce buffers (for 4.1 stable only)

2018-01-09 Thread Long Li
> Christoph, > > > Ok. If the stable maintainers are ok with your small fix I'm not > > going to complain too loudly. But I'm always worried about stable > > trees divering too much from mainline. > > The seemingly innocuous transition from SG_GAPS to virt boundary has > caused several data cor

[PATCH 19/36] scsi: Define usercopy region in scsi_sense_cache slab cache

2018-01-09 Thread Kees Cook
From: David Windsor SCSI sense buffers, stored in struct scsi_cmnd.sense and therefore contained in the scsi_sense_cache slab cache, need to be copied to/from userspace. cache object allocation: drivers/scsi/scsi_lib.c: scsi_select_sense_cache(...): return ... ? scsi_sens

Re: [PATCH 00/18] prevent bounds-check bypass via speculative execution

2018-01-09 Thread Josh Poimboeuf
On Tue, Jan 09, 2018 at 11:44:05AM -0800, Dan Williams wrote: > On Tue, Jan 9, 2018 at 11:34 AM, Jiri Kosina wrote: > > On Fri, 5 Jan 2018, Dan Williams wrote: > > > > [ ... snip ... ] > >> Andi Kleen (1): > >> x86, barrier: stop speculation for failed access_ok > >> > >> Dan Williams (13):

Re: [PATCH 13/14] megaraid_sas: NVME passthru command support

2018-01-09 Thread Douglas Gilbert
On 2018-01-09 11:45 AM, Christoph Hellwig wrote: On Tue, Jan 09, 2018 at 10:07:28PM +0530, Kashyap Desai wrote: Chris - Overall NVME support behind MR controller is really a SCSI device. On top of that, for MegaRaid, NVME device can be part of Virtual Disk and those drive will not be exposed to

Re: [PATCH 00/18] prevent bounds-check bypass via speculative execution

2018-01-09 Thread Jiri Kosina
On Fri, 5 Jan 2018, Dan Williams wrote: [ ... snip ... ] > Andi Kleen (1): > x86, barrier: stop speculation for failed access_ok > > Dan Williams (13): > x86: implement nospec_barrier() > [media] uvcvideo: prevent bounds-check bypass via speculative execution > carl9170: p

Re: [PATCH 00/18] prevent bounds-check bypass via speculative execution

2018-01-09 Thread Dan Williams
On Tue, Jan 9, 2018 at 11:34 AM, Jiri Kosina wrote: > On Fri, 5 Jan 2018, Dan Williams wrote: > > [ ... snip ... ] >> Andi Kleen (1): >> x86, barrier: stop speculation for failed access_ok >> >> Dan Williams (13): >> x86: implement nospec_barrier() >> [media] uvcvideo: prevent bo

Re: [linux-next][qla2xxx][85caa95]kernel BUG at lib/list_debug.c:31!

2018-01-09 Thread Madhani, Himanshu
Hello Abdul, > On Jan 9, 2018, at 7:54 AM, Bart Van Assche wrote: > > On Tue, 2018-01-09 at 14:44 +0530, Abdul Haleem wrote: >> Greeting's, >> >> Linux next kernel panics on powerpc when module qla2xxx is load/unload. >> >> Machine Type: Power 8 PowerVM LPAR >> Kernel : 4.15.0-rc2-next-20171

Re: [bug report] scsi: qla2xxx: Fix NULL pointer access for fcport structure

2018-01-09 Thread Tran, Quinn
Dan, Thanks. Will push out a fix soon. Regards, Quinn Tran -Original Message- From: Dan Carpenter Date: Tuesday, January 9, 2018 at 3:06 AM To: "Tran, Quinn" Cc: "linux-scsi@vger.kernel.org" Subject: [bug report] scsi: qla2xxx: Fix NULL pointer access for fcport structure Hello

Re: [PATCH 13/14] megaraid_sas: NVME passthru command support

2018-01-09 Thread Christoph Hellwig
On Tue, Jan 09, 2018 at 10:07:28PM +0530, Kashyap Desai wrote: > Chris - > > Overall NVME support behind MR controller is really a SCSI device. On top > of that, for MegaRaid, NVME device can be part of Virtual Disk and those > drive will not be exposed to the driver. User application may like to

RE: [PATCH 13/14] megaraid_sas: NVME passthru command support

2018-01-09 Thread Kashyap Desai
Chris - Overall NVME support behind MR controller is really a SCSI device. On top of that, for MegaRaid, NVME device can be part of Virtual Disk and those drive will not be exposed to the driver. User application may like to talk to hidden NVME devices (part of VDs). This patch will extend the exi

scsi: memory leak in sg_start_req

2018-01-09 Thread Dmitry Vyukov
Hello, syzkaller has found the following memory leak: unreferenced object 0x88004c19 (size 8328): comm "syz-executor", pid 4627, jiffies 4294749150 (age 45.507s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 22 01 00 0

Re: [linux-next][qla2xxx][85caa95]kernel BUG at lib/list_debug.c:31!

2018-01-09 Thread Bart Van Assche
On Tue, 2018-01-09 at 14:44 +0530, Abdul Haleem wrote: > Greeting's, > > Linux next kernel panics on powerpc when module qla2xxx is load/unload. > > Machine Type: Power 8 PowerVM LPAR > Kernel : 4.15.0-rc2-next-20171211 > gcc : version 4.8.5 > Test type: module load/unload few times > > Trace m

[PATCH] libsas: Disable asynchronous aborts for SATA devices

2018-01-09 Thread Hannes Reinecke
Handling CD-ROM devices from libsas is decidedly odd, as libata relies on SCSI EH to be started to figure out that no medium is present. So we cannot do asynchronous aborts for SATA devices. Signed-off-by: Hannes Reinecke --- drivers/scsi/libsas/sas_scsi_host.c | 17 +++-- 1 file cha

Re: [PATCHv2] libsas: Check for completed commands before calling lldd_abort_task()

2018-01-09 Thread Yves-Alexis Perez
On Tue, 2018-01-09 at 10:30 +0100, Hannes Reinecke wrote: > Can you try to boot the stock 4.15 kernel (without any patches) with > scsi_mod.scsi_logging_level=9411 > on the kernel commandline and send me tha output? > I really would like to see which command fails. > THX. Here it is: [ 204.96050

[bug report] scsi: qla2xxx: Fix NULL pointer access for fcport structure

2018-01-09 Thread Dan Carpenter
Hello Quinn Tran, This is a semi-automatic email about new static checker warnings. The patch 5c25d451163c: "scsi: qla2xxx: Fix NULL pointer access for fcport structure" from Dec 28, 2017, leads to the following Smatch complaint: drivers/scsi/qla2xxx/qla_init.c:130 qla2x00_async_iocb_timeout

Re: [PATCHv2] libsas: Check for completed commands before calling lldd_abort_task()

2018-01-09 Thread Hannes Reinecke
On 01/08/2018 06:11 PM, Yves-Alexis Perez wrote: > On Mon, 2018-01-08 at 13:04 +0100, Hannes Reinecke wrote: >> The abort handler might be racing with command completion, so the >> task might already be NULL by the time the abort handler is called. > > Hi, > > I tried the patch on top of 4.15-rc7

Re: [PATCHv2] libsas: Check for completed commands before calling lldd_abort_task()

2018-01-09 Thread Hannes Reinecke
On 01/09/2018 10:04 AM, Jason Yan wrote: > > On 2018/1/9 15:34, Hannes Reinecke wrote: >> On 01/09/2018 05:09 AM, Jason Yan wrote: >>> Hannes, >>> >>> On 2018/1/8 20:04, Hannes Reinecke wrote: The abort handler might be racing with command completion, so the task might already be NULL by

Re: [RESEND PATCH 2/2] scsi: qedi: Use zeroing allocator instead of allocator/memset

2018-01-09 Thread Rangankar, Manish
On 09/01/18 2:36 PM, "Himanshu Jha" wrote: >Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset >0. > >Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci > >Suggested-by: Luis R. Rodriguez >Signed-off-by: Himanshu Jha >--- > drivers/scsi/qedi/qedi_main.c | 42

[RESEND PATCH 2/2] scsi: qedi: Use zeroing allocator instead of allocator/memset

2018-01-09 Thread Himanshu Jha
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/qedi/qedi_main.c | 42 +++--- 1 file chan

[RESEND PATCH 1/2] scsi: bnx2fc: Use zeroing allocator rather than allocator/memset

2018-01-09 Thread Himanshu Jha
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez Signed-off-by: Himanshu Jha --- drivers/scsi/bnx2fc/bnx2fc_hwi.c | 60 +--- drivers/sc

Re: [PATCHv2] libsas: Check for completed commands before calling lldd_abort_task()

2018-01-09 Thread Jason Yan
On 2018/1/9 15:34, Hannes Reinecke wrote: On 01/09/2018 05:09 AM, Jason Yan wrote: Hannes, On 2018/1/8 20:04, Hannes Reinecke wrote: The abort handler might be racing with command completion, so the task might already be NULL by the time the abort handler is called. Signed-off-by: Hannes Rei