Oops: NULL pointer dereference - RIP: isci_task_abort_task+0x30/0x3e0 [isci]

2018-01-05 Thread Yves-Alexis Perez
Hi, since kernel 4.11 (sorry it took so long to report) I have a box failing to boot with a NULL pointer dereference (the box is stuck there afterwards). The bug has also been reported to the Debian BTS (https://bugs.debian.org/cgi- bin/bugreport.cgi?bug=882414) and a suggestion to revert 9096576

[PATCH 04/14] megaraid_sas: Reset ldio_outstanding in megasas_resume

2018-01-05 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 38120917c609..424858874d57 100644 --- a/drivers/scsi/megaraid/megaraid_sas_ba

[PATCH 01/14] megaraid_sas: zero out IOC INIT and stream detection memory

2018-01-05 Thread Shivasharan S
Memory allocated for IOC_INIT command and stream detection array are not zero'd before using. Use kzalloc instead of kmalloc to zero out the memory allocated. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- drivers/scsi/megaraid/m

[PATCH 05/14] megaraid_sas: Error handling for invalid ldcount provided by firmware in RAID map

2018-01-05 Thread Shivasharan S
Currently driver does not validate ldcount provided by firmware. If the value is invalid, fail RAID map validation accordingly. This issue is rare to hit in field and is fixed as part of code review. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas

[PATCH 00/14] megaraid_sas: driver updates

2018-01-05 Thread Shivasharan S
Shivasharan S (14): megaraid_sas: zero out IOC INIT and stream detection memory megaraid_sas: memset IOC INIT frame using correct size megaraid_sas: Return the DCMD status from megasas_get_seq_num megaraid_sas: Reset ldio_outstanding in megasas_resume megaraid_sas: Error handling for inva

[PATCH 03/14] megaraid_sas: Return the DCMD status from megasas_get_seq_num

2018-01-05 Thread Shivasharan S
In megasas_get_seq_num, the status of the DCMD fired to FW is not returned, always success is returned. We could end up registering AEN request with incorrect sequence number if the DCMD failed. Return the DCMD status back to caller. This was discovered during code review and very rare to see issue

[PATCH 07/14] megaraid_sas: Avoid firing DCMDs while OCR is in progress

2018-01-05 Thread Shivasharan S
Driver needs to avoid PCI writes while OCR is in progress. Use reset_mutex to synchronize between firing DCMDs MR_DCMD_PD_GET_INFO and MR_DCMD_DRV_GET_TARGET_PROP while OCR is triggered. Without this fix, if Device/VD add/creation is in progress and at the same time MR Firmware is going through OCR

[PATCH 06/14] megaraid_sas: unload flag should be set after scsi_remove_host is called

2018-01-05 Thread Shivasharan S
Issue - Driver returns DID_NO_CONNECT when unload is in progress, indicated using instance->unload flag. In case of dynamic unload of driver, this flag is set before calling scsi_remove_host(). While doing manual driver unload, user will see lots of prints for Sync Cache command with DID_NO_CONNECT

[PATCH 02/14] megaraid_sas: memset IOC INIT frame using correct size

2018-01-05 Thread Shivasharan S
Commit b9637d14dc00 ("scsi: megaraid_sas: Resize MFA frame used for IOC INIT to 4k") increased the size of IOC INIT frame to 4k. Need to use updated size when memsetting init_frame. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 1 file changed, 1 insertion(+

[PATCH 10/14] megaraid_sas: Selectively apply stream detection based on IO type

2018-01-05 Thread Shivasharan S
Performance improvement- Current driver calls stream detection unconditionally for all IOs. Stream Detection logic is not required for most of the fast path IO. To improve performance, avoid stream detection logic and do it only if required. Below are the cases where stream detection is required in

[PATCH 11/14] megaraid_sas: Expose fw_cmds_outstanding through sysfs

2018-01-05 Thread Shivasharan S
Expose FW outstanding commands (fw_outstanding) through sysfs interface. This helps in debugging certain performance issues in the field. Signed-off-by: Sasikumar Chandrasekaran Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 13 + 1 file changed, 13 ins

[PATCH 09/14] megaraid_sas: Update LD map after populating drv_map driver map copy

2018-01-05 Thread Shivasharan S
Issue – There may be some IO accessing incorrect raid map, but driver has checks in IO path to handle those cases. It is always better to move to new raid map only once raid map is populated and validated. No functional defect. Fix is provided as part of review. Fix – Update instance->map_id after

[PATCH 08/14] megaraid_sas: Use megasas_wait_for_adapter_operational to detect controller state in IOCTL path

2018-01-05 Thread Shivasharan S
In IOCTL path, re-use megasas_wait_for_adapter_operational API to detect controller state. This will make driver to use this API uniformly in all cases where we need to wait for adapter to become operational. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/meg

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

2018-01-05 Thread Shivasharan S
Feature - NVME pass-through via MFI interface. Current MR product support different encapsulation via MFI frame work. NVME native command should be framed by application and it should be embedded in MFI as payload. Driver will provide interface to send MFI frame along with payload (In this case, p

[PATCH 12/14] megaraid_sas: re-work DCMD refire code

2018-01-05 Thread Shivasharan S
No functional changes. This patch is a re-work of DCMD refire code to better manage all the different cases to decide whether to REFIRE or SKIP or COMPLETE certain DCMD. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++-- drivers/s

[PATCH 14/14] megaraid_sas: driver version upgrade

2018-01-05 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index d557ff03eb1d..ba6503f37756 100644 --- a/drivers/scsi/megaraid/megaraid_s

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

2018-01-05 Thread Shivasharan S
Feature - NVME pass-through via MFI interface. Current MR product support different encapsulation via MFI frame work. NVME native command should be framed by application and it should be embedded in MFI as payload. Driver will provide interface to send MFI frame along with payload (In this case, p

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

2018-01-05 Thread Shivasharan S
Feature - NVME pass-through via MFI interface. Current MR product support different encapsulation via MFI frame work. NVME native command should be framed by application and it should be embedded in MFI as payload. Driver will provide interface to send MFI frame along with payload (In this case, p

[PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c

2018-01-05 Thread Colin King
From: Colin Ian King A previous commit no longer stores the contents of c, so we now have a situation where c is being updated but the value is never read. Clean up the code by removing the now redundant setting of variable c. Cleans up clang warning: drivers/scsi/aacraid/aachba.c:943:3: warning

[PATCH][scsi-next] scsi: qla2xxx: remove redundant assignment of d

2018-01-05 Thread Colin King
From: Colin Ian King The initialization of d is redundant as this value is never read and it is overwritten inside the subsequent for-loop. Remove this redundant assignment. Cleans up clang warning: drivers/scsi/qla2xxx/qla_gs.c:3985:29: warning: Value stored to 'd' during its initialization is

Re: [PATCH V9 0/7] blk-mq support for ZBC disks

2018-01-05 Thread Jens Axboe
On Thu, Dec 21 2017, Damien Le Moal wrote: > This series, formerly titled "scsi-mq support for ZBC disks", implements > support for ZBC disks for system using the scsi-mq I/O path. > > The current scsi level support of ZBC disks guarantees write request ordering > using a per-zone write lock which

[PATCH v4 2/5] crypto: scompress - use sgl_alloc() and sgl_free()

2018-01-05 Thread Bart Van Assche
Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Acked-by: Ard Biesheuvel Cc: Herbert Xu --- crypto/Kconfig | 1 + crypto/scompress.c | 51 ++- 2 files changed, 3 insertions(

[PATCH v4 4/5] nvmet/rdma: Use sgl_alloc() and sgl_free()

2018-01-05 Thread Bart Van Assche
Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Cc: Keith Busch Cc: Christoph Hellwig Cc: Sagi Grimberg --- drivers/nvme/target/Kconfig | 1 + drivers/nvme/targe

[PATCH v4 3/5] nvmet/fc: Use sgl_alloc() and sgl_free()

2018-01-05 Thread Bart Van Assche
Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Cc: Keith Busch Cc: Christoph Hellwig Cc: James Smart Cc: Sagi Grimberg --- drivers/nvme/target/Kconfig | 1 + d

[PATCH v4 5/5] target: Use sgl_alloc_order() and sgl_free()

2018-01-05 Thread Bart Van Assche
Use the sgl_alloc_order() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Acked-by: Nicholas A. Bellinger Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg --- drivers/target/Kconfig | 1 + drivers/target/tar

[PATCH v4 0/5] Introduce sgl_alloc() and sgl_free()

2018-01-05 Thread Bart Van Assche
Hello Jens, As you know there are multiple drivers that both allocate a scatter/gather list and populate that list with pages. This patch series moves the code for allocating and freeing such scatterlists from several drivers into lib/scatterlist.c. Please consider this patch series for kernel v4.

[PATCH v4 1/5] lib/scatterlist: Introduce sgl_alloc() and sgl_free()

2018-01-05 Thread Bart Van Assche
Many kernel drivers contain code that allocates and frees both a scatterlist and the pages that populate that scatterlist. Introduce functions in lib/scatterlist.c that perform these tasks instead of duplicating this functionality in multiple drivers. Only include these functions in the build if CO

Re: HP ProLiant DL360p Gen8 hangs with Linux 4.13+.

2018-01-05 Thread Bart Van Assche
On Thu, 2018-01-04 at 14:32 -0800, Vinson Lee wrote: > HP ProLiant DL360p Gen8 with Smart Array P420i boots to the login > prompt and hangs with Linux 4.13 or later. I cannot log in on console > or SSH into the machine. Linux 4.12 and older boot fine. > > I see these messages on the console. > >

Re: [PATCH v4 3/5] nvmet/fc: Use sgl_alloc() and sgl_free()

2018-01-05 Thread James Smart
On 1/5/2018 8:26 AM, Bart Van Assche wrote: Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Cc: Keith Busch Cc: Christoph Hellwig Cc: James Smart Cc: Sagi Grimbe

RE: [PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c

2018-01-05 Thread Raghava Aditya Renukunta
> -Original Message- > From: Colin King [mailto:colin.k...@canonical.com] > Sent: Friday, January 5, 2018 7:31 AM > To: dl-esc-Aacraid Linux Driver ; James E . J . > Bottomley ; Martin K . Petersen > ; linux-scsi@vger.kernel.org > Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.kern

[PATCH 0/2] Fix a race condition between SPI domain validation and system suspend

2018-01-05 Thread Bart Van Assche
Hello Martin, Recently it was discovered that the v4.15 rework of suspend/resume handling in the SCSI subsystem introduced a race condition between SPI domain validation and system suspend. The two patches in this series fix that race. Please consider these two patches for kernel v4.15. Thanks,

[PATCH 1/2] PM / sleep: Make lock/unlock_system_sleep() available to kernel modules

2018-01-05 Thread Bart Van Assche
Since pm_mutex is not exported using lock/unlock_system_sleep() from inside a kernel module causes a "pm_mutex undefined" linker error. Hence move lock/unlock_system_sleep() into kernel/power/main.c and export these. Signed-off-by: Bart Van Assche Cc: Rafael J. Wysocki --- include/linux/suspend

[PATCH 2/2] Fix a race condition between SPI domain validation and system suspend

2018-01-05 Thread Bart Van Assche
Avoid that the following warning is reported when suspending a system that is using the mptspi driver: WARNING: CPU: 0 PID: 4187 at drivers/scsi/scsi_lib.c:2960 scsi_device_quiesce+0x20/0xb0 EIP: scsi_device_quiesce+0x20/0xb0 Call Trace: spi_dv_device+0x65/0x5f0 [scsi_transport_spi] mptspi_dv_d

Re: [PATCH v4 0/5] Introduce sgl_alloc() and sgl_free()

2018-01-05 Thread Jens Axboe
On 1/5/18 9:26 AM, Bart Van Assche wrote: > Hello Jens, > > As you know there are multiple drivers that both allocate a scatter/gather > list and populate that list with pages. This patch series moves the code for > allocating and freeing such scatterlists from several drivers into > lib/scatterli

Re: [PATCH 1/2] PM / sleep: Make lock/unlock_system_sleep() available to kernel modules

2018-01-05 Thread Rafael J. Wysocki
On Fri, Jan 5, 2018 at 6:19 PM, Bart Van Assche wrote: > Since pm_mutex is not exported using lock/unlock_system_sleep() from > inside a kernel module causes a "pm_mutex undefined" linker error. > Hence move lock/unlock_system_sleep() into kernel/power/main.c and > export these. > > Signed-off-by:

Re: [PATCH 1/2] PM / sleep: Make lock/unlock_system_sleep() available to kernel modules

2018-01-05 Thread Bart Van Assche
On Sat, 2018-01-06 at 00:00 +0100, Rafael J. Wysocki wrote: > The changes are fine by me, but I really would prefer them to go in > via the PM tree which I guess means that the second patch would need > to go in this way too. Hello Rafael, If I can get a Tested-by from Woody and an Acked-by from

Re: [PATCH 1/2] PM / sleep: Make lock/unlock_system_sleep() available to kernel modules

2018-01-05 Thread Rafael J. Wysocki
On Sat, Jan 6, 2018 at 12:32 AM, Bart Van Assche wrote: > On Sat, 2018-01-06 at 00:00 +0100, Rafael J. Wysocki wrote: >> The changes are fine by me, but I really would prefer them to go in >> via the PM tree which I guess means that the second patch would need >> to go in this way too. > > Hello R

[PATCH 10/18] qla2xxx: prevent bounds-check bypass via speculative execution

2018-01-05 Thread Dan Williams
Static analysis reports that 'handle' may be a user controlled value that is used as a data dependency to read 'sp' from the 'req->outstanding_cmds' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue reads based

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

2018-01-05 Thread Dan Williams
Quoting Mark's original RFC: "Recently, Google Project Zero discovered several classes of attack against speculative execution. One of these, known as variant-1, allows explicit bounds checks to be bypassed under speculation, providing an arbitrary read gadget. Further details can be found on the

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

2018-01-05 Thread Eric W. Biederman
Dan Williams writes: > Quoting Mark's original RFC: > > "Recently, Google Project Zero discovered several classes of attack > against speculative execution. One of these, known as variant-1, allows > explicit bounds checks to be bypassed under speculation, providing an > arbitrary read gadget. Fu

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

2018-01-05 Thread Dan Williams
On Fri, Jan 5, 2018 at 6:22 PM, Eric W. Biederman wrote: > Dan Williams writes: > >> Quoting Mark's original RFC: >> >> "Recently, Google Project Zero discovered several classes of attack >> against speculative execution. One of these, known as variant-1, allows >> explicit bounds checks to be by