Re: [PATCH 14/18] scsi: Make scsi_initialize_rq() zero the entire struct scsi_cmnd

2017-05-22 Thread Bart Van Assche
On Sun, 2017-05-21 at 08:49 +0200, Christoph Hellwig wrote: > On Fri, May 19, 2017 at 11:30:12AM -0700, Bart Van Assche wrote: > > This simplifies the memset() call in scsi_initialize_rq() and avoids > > that any stale data is left behind in struct scsi_request. > > > > Signed-off-by: Bart Van

Re: [PATCH 19/25] qla2xxx: Replace ql2xexchoffld & ql_dm_tgt_ex_pct parameter

2017-05-22 Thread Madhani, Himanshu
Hi Bart, > On May 19, 2017, at 4:27 PM, Bart Van Assche > wrote: > > On Fri, 2017-05-19 at 14:53 -0700, Himanshu Madhani wrote: >> [ ... ] >> -int ql2xexchoffld = 0; >> -module_param(ql2xexchoffld, uint, S_IRUGO|S_IWUSR); >> -MODULE_PARM_DESC(ql2xexchoffld, >> -

Re: [PATCH 02/25] qla2xxx: Remove redundant fc_host_port_name call

2017-05-22 Thread Madhani, Himanshu
Hi Bart, > On May 19, 2017, at 3:37 PM, Bart Van Assche > wrote: > > On Fri, 2017-05-19 at 14:53 -0700, Himanshu Madhani wrote: >> From: Quinn Tran >> >> Remove redundant fc_host_port_name calls to prevent >> early access of

Re: [PATCH 17/25] qla2xxx: Cleanup debug messager IDs.

2017-05-22 Thread Madhani, Himanshu
Hi Bart, > On May 19, 2017, at 4:23 PM, Bart Van Assche > wrote: > > On Fri, 2017-05-19 at 14:53 -0700, Himanshu Madhani wrote: >> diff --git a/drivers/scsi/qla2xxx/qla_attr.c >> b/drivers/scsi/qla2xxx/qla_attr.c >> index 7c8d6c54ab70..a7ac81b473a4 100644 >> ---

Re: [PATCH 03/25] qla2xxx: Allow ABTS RX, RIDA on ATIOQ for ISP83XX/27XX

2017-05-22 Thread Madhani, Himanshu
Hi Bart, > On May 19, 2017, at 3:42 PM, Bart Van Assche > wrote: > > On Fri, 2017-05-19 at 14:53 -0700, Himanshu Madhani wrote: >> From: Quinn Tran >> >> Allow ABTS RX, RIDA to be moved to ATIO Queue only for >> ISP83XX and ISP27XX. > >

Re: [PATCH blktests v2 3/3] sg/001: add regression test for syzcaller generated GPF in sg_read path

2017-05-22 Thread Omar Sandoval
On Fri, May 19, 2017 at 03:55:31PM +0200, Johannes Thumshirn wrote: > Add a regression test for commit 48ae8484e9fc ("scsi: sg: don't return > bogus Sg_requests"). This is a general protection fault triggered by > syzcaller via issuing bogus read(2)s on the /dev/sg devices. > > Signed-off-by:

Re: [PATCH 20/25] qla2xxx: Remove redundant code

2017-05-22 Thread Bart Van Assche
On Sun, 2017-05-21 at 21:27 -0700, Nicholas A. Bellinger wrote: > The three lists abort_cmd_for_tag() walks from __qlt_24xx_handle_abts() > are used to track descriptors only before __qlt_do_work() is reached, > and before a descriptor is submitted into tcm_qla2xxx code. > > Or rather, the three

Re: [PATCH 15/18] scsi: storvsc: Initialize driver-private command before using it

2017-05-22 Thread Bart Van Assche
On Sun, 2017-05-21 at 08:51 +0200, Christoph Hellwig wrote: > On Fri, May 19, 2017 at 11:30:13AM -0700, Bart Van Assche wrote: > > The storvsc driver is the only SCSI LLD that uses driver-private > > command data and that does not zero-initialize that data before > > reading it. Make this driver

Re: [PATCH 20/25] qla2xxx: Remove redundant code

2017-05-22 Thread Tran, Quinn
-Original Message- From: on behalf of Bart Van Assche Date: Monday, May 22, 2017 at 11:23 AM To: Nicholas Bellinger Cc: "linux-scsi@vger.kernel.org" ,

Re: work queue of scsi fc transports should be serialized

2017-05-22 Thread Martin Wilck
On Sat, 2017-05-20 at 08:25 +, Dashi DS1 Cao wrote: > On Fri, 2017-05-19 at 09:36 +, Dashi DS1 Cao wrote: > > It seems there is a race of multiple "fc_starget_delete" of the > > same  > > rport, thus of the same SCSI host. The race leads to the race of  > > scsi_remove_target and it cannot

[PATCH] qla2xxx: Remove an unused structure member

2017-05-22 Thread Bart Van Assche
qla_tgt_cmd.free_work is not used by the qla2xxx driver. Hence remove that member of struct qla_tgt_cmd. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Hannes Reinecke

[PATCH v9 10/15] scsi: lpfc: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. It also updates some comments, accordingly. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin ---

[PATCH v9 14/15] scsi: pmcraid: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin

[PATCH v9 06/15] mlx5: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin Acked-by: Doug Ledford

[PATCH v9 11/15] scsi: megaraid: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin Acked-by: Sumit Saxena

[PATCH v9 08/15] scsi: be2iscsi: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin

[PATCH v9 04/15] net: e100: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Acked-by: Jeff Kirsher

[PATCH v9 09/15] scsi: csiostor: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. It also updates the name of some variables and the content of comments, accordingly. Signed-off-by: Romain Perier Reviewed-by: Peter Senna

[PATCH v9 07/15] wireless: ipw2200: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/net/wireless/intel/ipw2x00/ipw2200.c |

[PATCH v9 03/15] IB/mthca: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin

[PATCH v9 00/15] Replace PCI pool by DMA pool API

2017-05-22 Thread Romain Perier
by the dma pool API and remove the defines. Changes in v9: - Rebased series onto next-20170522 - I have fixed and improved the patch for lpfc driver Changes in v8: - Rebased series onto next-20170428 Changes in v7: - Rebased series onto next-20170416 - Added Acked-by, Tested-by and Reviwed-by tags

[PATCH v9 02/15] dmaengine: pch_dma: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin

[PATCH v9 01/15] block: DAC960: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin

Re: [PATCH 07/18] block: Introduce request_queue.initialize_rq_fn()

2017-05-22 Thread Bart Van Assche
On Sun, 2017-05-21 at 08:34 +0200, Christoph Hellwig wrote: > On Fri, May 19, 2017 at 11:30:05AM -0700, Bart Van Assche wrote: > > Several block drivers need to initialize the driver-private data > > after having called blk_get_request() and before .prep_rq_fn() is > > called, e.g. when submitting

Re: [PATCH 06/18] scsi: Make scsi_ioctl_reset() pass the request queue pointer to blk_rq_init()

2017-05-22 Thread h...@lst.de
On Mon, May 22, 2017 at 08:06:46AM +0200, Hannes Reinecke wrote: > Problem is that quite some LLDDs require a hardware tag for sending > TMFs, and currently the re-use the tag from the passed in scmd for that. > So first we need to move those to a sane interface, and having them > requesting a new

Re: [PATCH 06/18] scsi: Make scsi_ioctl_reset() pass the request queue pointer to blk_rq_init()

2017-05-22 Thread Hannes Reinecke
On 05/21/2017 06:41 PM, Bart Van Assche wrote: > On Sun, 2017-05-21 at 08:50 +0200, Christoph Hellwig wrote: >> Although we really need to stop abusing requests/cmds for EH.. >> (Hannes, time to dust off your old patches!) > > Hello Christoph and Hannes, > > How about passing a struct

Re: [PATCH 02/18] bsg: Check private request size before attaching to a queue

2017-05-22 Thread h...@lst.de
On Sun, May 21, 2017 at 02:33:05PM +, Bart Van Assche wrote: > Thanks for the review comments. The cover letter should have made it to at > least the linux-scsi mailing list since it shows up in at least one archive of > that mailing list:

Re: [PATCH 06/18] scsi: Make scsi_ioctl_reset() pass the request queue pointer to blk_rq_init()

2017-05-22 Thread Hannes Reinecke
On 05/22/2017 09:54 AM, h...@lst.de wrote: > On Mon, May 22, 2017 at 08:06:46AM +0200, Hannes Reinecke wrote: >> Problem is that quite some LLDDs require a hardware tag for sending >> TMFs, and currently the re-use the tag from the passed in scmd for that. >> So first we need to move those to a

Re: [PATCH] scsi: smartpqi: mark PM functions as __maybe_unused

2017-05-22 Thread Arnd Bergmann
On Fri, May 19, 2017 at 3:53 AM, Martin K. Petersen wrote: > > Arnd, > >> I notice that today's linux-next no longer contains the patch that >> introduced the warning. > > I had tagged my 4.12 fixes branch with for-next. It should be back to > 4.13 material shortly.

Re: [PATCH 06/18] scsi: Make scsi_ioctl_reset() pass the request queue pointer to blk_rq_init()

2017-05-22 Thread h...@lst.de
On Mon, May 22, 2017 at 10:46:10AM +0200, Hannes Reinecke wrote: > > That seems to be overkill to me for the few drivers. And I suspect > > most of them would be better off now even using blk-mq private tags > > (which we'd have to implement for the legacy path first or just > > kill it off) but

Re: [PATCH 06/18] scsi: Make scsi_ioctl_reset() pass the request queue pointer to blk_rq_init()

2017-05-22 Thread h...@lst.de
On Mon, May 22, 2017 at 02:56:18PM +0200, Hannes Reinecke wrote: > > No, we don't. The driver simply sets a tag aside and doesn't expose > > it to the block layer. Similar to what smartpqi already does for LUN > > resets and AENs, mpt3sas does for the ioctl tags and NVMe does for AERs. > >

Re: [PATCH 06/18] scsi: Make scsi_ioctl_reset() pass the request queue pointer to blk_rq_init()

2017-05-22 Thread Hannes Reinecke
On 05/22/2017 02:48 PM, h...@lst.de wrote: > On Mon, May 22, 2017 at 10:46:10AM +0200, Hannes Reinecke wrote: >>> That seems to be overkill to me for the few drivers. And I suspect >>> most of them would be better off now even using blk-mq private tags >>> (which we'd have to implement for the

Re: [PATCH 1/2] libsas: Don't process sas events in static works

2017-05-22 Thread John Garry
On 22/05/2017 06:54, wangyijing wrote: I also think for safety this should use a mempool that guarantees that > events can continue to be processed under system memory pressure. What I am worried about is it's would still fail if the mempool is used empty during memory pressure. > Also, have

Re: [PATCH] csiostor: Avoid content leaks and casts

2017-05-22 Thread Varun Prakash
On Tue, May 09, 2017 at 03:34:44PM -0700, Kees Cook wrote: > When copying attributes, the len argument was padded out and the resulting > memcpy() would copy beyond the end of the source buffer. Avoid this, > and use size_t for val_len to avoid all the casts. Similarly, avoid source > buffer

Re: [PATCH] csiostor: Avoid content leaks and casts

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 8:05 AM, Varun Prakash wrote: > On Tue, May 09, 2017 at 03:34:44PM -0700, Kees Cook wrote: >> When copying attributes, the len argument was padded out and the resulting >> memcpy() would copy beyond the end of the source buffer. Avoid this, >> and use

[PATCH] scsi: cxgbi: add null check before pointer dereference

2017-05-22 Thread Gustavo A. R. Silva
Add null check before dereferencing pointer _sg_ inside sg_next() Addresses-Coverity-ID: 1364845 Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/cxgbi/libcxgbi.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git

[PATCH v9 13/15] scsi: mvsas: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/scsi/mvsas/mv_init.c | 6 +++---

[PATCH v9 05/15] mlx4: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin

[PATCH v9 12/15] scsi: mpt3sas: Replace PCI pool old API

2017-05-22 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/scsi/mpt3sas/mpt3sas_base.c | 73

[PATCH v9 15/15] PCI: Remove PCI pool macro functions

2017-05-22 Thread Romain Perier
Now that all the drivers use dma pool API, we can remove the macro functions for PCI pool. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- include/linux/pci.h | 9 - 1 file changed, 9 deletions(-) diff --git

[PATCH] scsi: hisi_sas: add null check before indirect pointer dereference

2017-05-22 Thread Gustavo A. R. Silva
Add null check before indirectly dereferencing pointer task->lldd_task in statement u32 tag = slot->idx; Addresses-Coverity-ID: 1373843 Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)