Re: [PATCH] scsi: remove extra white space at the end of the line

2018-01-08 Thread Johannes Thumshirn
"Martin K. Petersen" writes: > I am thoroughly annoyed by all the legacy whitespace problems. I've been > working on two different sd patch series over the holidays and both > caused me no end of grief due to legacy formatting issues. > > I have had an unbreak-sd patch sitting in my queue for seve

Re: [PATCH v2 4/4] scsi: pm8001: fix dma_unmap_sg() parameter

2018-01-08 Thread chenxiang (M)
+cc Jack Wang 在 2018/1/4 10:36, chenxiang 写道: For function dma_unmap_sg(), the parameter should be number of elements in the scatterlist prior to the mapping, not after the mapping. Fix this usage. Cc: Jack Wang Cc: lindar_...@usish.com Fixes: dbf9bfe6("[SCSI]pm8001: add SAS/SATA/HBA driver"

Re: [PATCH v3 1/3] scsi: libsas: fix memory leak in sas_smp_get_phy_events()

2018-01-08 Thread Hannes Reinecke
On 01/04/2018 02:04 PM, Jason Yan wrote: > We've got a memory leak with the following producer: > > while true; > do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null; > done > > The buffer req is allocated and not freed after we return. Fix it. > > Fixes: 2908d778ab3e ("[SCSI] ai

Re: [PATCH v3 2/3] scsi: libsas: fix error when getting phy events

2018-01-08 Thread Hannes Reinecke
On 01/04/2018 02:04 PM, Jason Yan wrote: > The intend purpose here was to goto out if smp_execute_task() returned > error. Obviously something got screwed up. We will never get these link > error statistics below: > > ~:/sys/class/sas_phy/phy-1:0:12 # cat invalid_dword_count > 0 > ~:/sys/class/sas

Re: [PATCH v3 3/3] scsi: libsas: initialize sas_phy status according to response of DISCOVER

2018-01-08 Thread Hannes Reinecke
On 01/04/2018 02:04 PM, Jason Yan wrote: > From: chenxiang > > The status of SAS PHY is in sas_phy->enabled. There is an issue that the > status of a remote SAS PHY may be initialized incorrectly: if disable remote > SAS PHY through sysfs interface (such as echo 0 > > /sys/class/sas_phy/phy-1:0:

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

2018-01-08 Thread Christoph Hellwig
NAK. Please implement the same ioctl interfaces as the nvme driver instead of inventing your own incomaptible one.

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

2018-01-08 Thread Peter Zijlstra
On Fri, Jan 05, 2018 at 10:30:16PM -0800, Dan Williams wrote: > On Fri, Jan 5, 2018 at 6:22 PM, Eric W. Biederman > wrote: > > In at least one place (mpls) you are patching a fast path. Compile out > > or don't load mpls by all means. But it is not acceptable to change the > > fast path without

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

2018-01-08 Thread Christoph Hellwig
Hannes said he was going to look into this, which makes sense given that he designed the async abort code. On Fri, Jan 05, 2018 at 01:13:48PM +0100, Yves-Alexis Perez wrote: > Hi, > > since kernel 4.11 (sorry it took so long to report) I have a box failing to > boot with a NULL pointer dereferenc

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

2018-01-08 Thread Hannes Reinecke
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 Reinecke --- drivers/scsi/libsas/sas_scsi_host.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/libsa

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

2018-01-08 Thread Hannes Reinecke
On 01/08/2018 11:11 AM, Christoph Hellwig wrote: > Hannes said he was going to look into this, which makes sense > given that he designed the async abort code. > > On Fri, Jan 05, 2018 at 01:13:48PM +0100, Yves-Alexis Perez wrote: >> Hi, >> >> since kernel 4.11 (sorry it took so long to report) I

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

2018-01-08 Thread Christoph Hellwig
On Mon, Jan 08, 2018 at 11:51:56AM +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. But without taking dev_done_lock (or using cmpxchg) what prevents use from still hitting this,

Re: [PATCH 0/4] mylex: Replace DAC960 block driver

2018-01-08 Thread Christoph Hellwig
Btw, did you manage to get any further with these new drivers?

Re: [PATCH 00/47] SCSI EH argument reshuffle part II

2018-01-08 Thread Christoph Hellwig
On Wed, Jun 28, 2017 at 10:32:26AM +0200, Hannes Reinecke wrote: > Hi all, > finally here's the patchset to revamp the SCSI EH callback arguments > which I promised to do (some years ago ...). What happened to this series?

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

2018-01-08 Thread Hannes Reinecke
On 01/08/2018 12:23 PM, Christoph Hellwig wrote: > On Mon, Jan 08, 2018 at 11:51:56AM +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. > > But without taking dev_done_lock (or u

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

2018-01-08 Thread Alan Cox
On Mon, 8 Jan 2018 11:08:36 +0100 Peter Zijlstra wrote: > On Fri, Jan 05, 2018 at 10:30:16PM -0800, Dan Williams wrote: > > On Fri, Jan 5, 2018 at 6:22 PM, Eric W. Biederman > > wrote: > > > In at least one place (mpls) you are patching a fast path. Compile out > > > or don't load mpls by al

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

2018-01-08 Thread Peter Zijlstra
On Mon, Jan 08, 2018 at 11:43:42AM +, Alan Cox wrote: > On Mon, 8 Jan 2018 11:08:36 +0100 > Peter Zijlstra wrote: > > > On Fri, Jan 05, 2018 at 10:30:16PM -0800, Dan Williams wrote: > > > On Fri, Jan 5, 2018 at 6:22 PM, Eric W. Biederman > > > wrote: > > > > In at least one place (mpls) y

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

2018-01-08 Thread Hannes Reinecke
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 Reinecke --- drivers/scsi/libsas/sas_scsi_host.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a

[PATCH] scsi: mptfusion: use strlcpy() instead of strncpy()

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/message/fusion/mptbase.c: In function 'mpt_display_event_info': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 100 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make sure the dest string is nu

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

2018-01-08 Thread Martin K. Petersen
Jens, > This looks OK for me for 4.16. I can grab all of them, or I can leave > the last two for Martin to apply if he prefers that, though that will > add a block tree dependency for SCSI. I already have a block dependency for 4.16. But it doesn't matter much. -- Martin K. Petersen Oracl

Re: [PATCH v1] scsi: hpsa: Use vsnprintf extension %phN

2018-01-08 Thread Martin K. Petersen
Andy, > Using this extension reduces the object size. Applied to 4.16/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering

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

2018-01-08 Thread Martin K. Petersen
Bart, > Avoid that the following warning is reported when suspending a system > that is using the mptspi driver: Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

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

2018-01-08 Thread Jens Axboe
On 1/8/18 8:52 AM, Martin K. Petersen wrote: > > Jens, > >> This looks OK for me for 4.16. I can grab all of them, or I can leave >> the last two for Martin to apply if he prefers that, though that will >> add a block tree dependency for SCSI. > > I already have a block dependency for 4.16. But

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

2018-01-08 Thread Bart Van Assche
On 01/05/18 22:30, Dan Williams wrote: On Fri, Jan 5, 2018 at 6:22 PM, Eric W. Biederman wrote: Please expand this. It is not clear what the static analysis is looking for. Have a clear description of what is being fixed is crucial for allowing any of these changes. For the details given in

Re: [PATCH] scsi: mptfusion: use strlcpy() instead of strncpy()

2018-01-08 Thread Arnd Bergmann
On Mon, Jan 8, 2018 at 1:49 PM, Xiongfeng Wang wrote: > From: Xiongfeng Wang > > gcc-8 reports > > drivers/message/fusion/mptbase.c: In function 'mpt_display_event_info': > ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified > bound 100 equals destination size [-Wstringop-trunc

Re: [PATCH 1/6] cxlflash: Reset command ioasc

2018-01-08 Thread Uma Krishnan
> On Jan 7, 2018, at 1:36 PM, Matthew R. Ochs wrote: > > On Thu, Jan 04, 2018 at 05:33:48PM +1100, Andrew Donnellan wrote: >> On 04/01/18 09:54, Uma Krishnan wrote: >>> In the event of a command failure, cxlflash returns the failure to the >>> upper layers to process. After processing the error,

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

2018-01-08 Thread Yves-Alexis Perez
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 (and without the revert of 90965761). I don't have the NULL

[Bug 151661] Adaptec 3405 3805 prints "AAC: Host adapter dead -1" every 10 seconds but works fine anyway

2018-01-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151661 --- Comment #22 from Matthias (hm10...@gmail.com) --- with my Adaptec 3405 and Kernel of Ubuntu 16.04.3 (Kernel 4.4.0-104-generic) and also with self-compiled 4.13.0, the message does not appear anymore. -- You are receiving this mail because: Y

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

2018-01-08 Thread Ingo Molnar
* Alan Cox wrote: > On Mon, 8 Jan 2018 11:08:36 +0100 > Peter Zijlstra wrote: > > > On Fri, Jan 05, 2018 at 10:30:16PM -0800, Dan Williams wrote: > > > On Fri, Jan 5, 2018 at 6:22 PM, Eric W. Biederman > > > wrote: > > > > In at least one place (mpls) you are patching a fast path. Compile

[PATCH 0/4] Make SCSI transport recovery more robust

2018-01-08 Thread Bart Van Assche
Hello Jens, A longstanding issue with the SCSI core is that several SCSI transport drivers use scsi_target_block() and scsi_target_unblock() to avoid concurrent .queuecommand() calls during e.g. transport recovery but that this is not sufficient to protect from such calls. Hence this patch series.

[PATCH 1/4] blk-mq: Rename request_queue.mq_freeze_wq into mq_wq

2018-01-08 Thread Bart Van Assche
Rename a waitqueue in struct request_queue since the next patch will add code that uses this waitqueue outside the request queue freezing implementation. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Ming Lei --- block/blk-core.c |

[PATCH 4/4] IB/srp: Fix a sleep-in-invalid-context bug

2018-01-08 Thread Bart Van Assche
The previous two patches guarantee that srp_queuecommand() does not get invoked while reconnecting occurs. Hence remove the code from srp_queuecommand() that prevents command queueing while reconnecting. This patch avoids that the following can appear in the kernel log: BUG: sleeping function call

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

2018-01-08 Thread Bart Van Assche
Introduce functions that allow block drivers to wait while a request queue is in the quiesced state (blk-mq) or in the stopped state (legacy block layer). The next patch will add calls to these functions in the SCSI core. Signed-off-by: Bart Van Assche Cc: Martin K. Petersen Cc: Christoph Hellwi

[PATCH 3/4] scsi: Avoid that .queuecommand() gets called for a quiesced SCSI device

2018-01-08 Thread Bart Van Assche
Several SCSI transport and LLD drivers surround code that does not tolerate concurrent calls of .queuecommand() with scsi_target_block() / scsi_target_unblock(). These last two functions use blk_mq_quiesce_queue() / blk_mq_unquiesce_queue() for scsi-mq request queues to prevent concurrent .queuecom

[PATCH] scsi: fnic: use kzalloc in fnic_fcoe_process_vlan_resp

2018-01-08 Thread Rasmus Villemoes
This saves a little .text and gets rid of the unmotivated line break and the sizeof(...) style inconsistency. Signed-off-by: Rasmus Villemoes --- drivers/scsi/fnic/fnic_fcs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/f

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

2018-01-08 Thread Rafael J. Wysocki
On Monday, January 8, 2018 5:02:53 PM CET Martin K. Petersen wrote: > > Bart, > > > Avoid that the following warning is reported when suspending a system > > that is using the mptspi driver: > > Acked-by: Martin K. Petersen Thanks! Let me take both patches to the linux-pm tree then. Thanks,

Re: [PATCH v3 1/3] scsi: libsas: fix memory leak in sas_smp_get_phy_events()

2018-01-08 Thread Martin K. Petersen
Jason, > We've got a memory leak with the following producer: Applied patches 1-3 to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: libcxgbi: use GFP_ATOMIC in cxgbi_conn_alloc_pdu()

2018-01-08 Thread Martin K. Petersen
Varun, > For mgmt cmds ->alloc_pdu() can be called from atomic > context so use GFP_ATOMIC instead of GFP_KERNEL. Applied to 4.16/scsi-queue, thank you! -- Martin K. Petersen Oracle Linux Engineering

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

2018-01-08 Thread Martin K. Petersen
Colin, > 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. Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux

Re: [PATCH] scsi: mptfusion: use strlcpy() instead of strncpy()

2018-01-08 Thread Martin K. Petersen
Xiongfeng, > gcc-8 reports > > drivers/message/fusion/mptbase.c: In function 'mpt_display_event_info': > ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified > bound 100 equals destination size [-Wstringop-truncation] > > We need to use strlcpy() to make sure the dest string is

Re: [PATCH 0/6] cxlflash: Miscellaneous patches

2018-01-08 Thread Martin K. Petersen
Uma, > This patch series contains miscellaneous fixes. The first patch fixes > a bug while the rest improve the code structure and prepare the code > for future enhancements. Added stable tag to first patch and applied series to 4.16/scsi-queue. Thank you! -- Martin K. Petersen Oracle Lin

Re: [Resend PATCH 00/11] mpt3sas: Enable scsi MQ & lockless command submission

2018-01-08 Thread Martin K. Petersen
Suganath, > This patch set is initially posted by Hannes Reinecke to enable scsi > multiqueue for the mpt3sas driver. While the HBA only has a single > mailbox register for submitting commands, it does have individual > receive queues per MSI-X interrupt and as such does benefit from > convertin

Re: [PATCH v2 3/3] scsi-mq-debugfs: Show more information

2018-01-08 Thread Martin K. Petersen
Bart, > Show the request result, request timeout and SCSI command flags. > This information is very helpful when trying to figure out why a > queue got stuck. An example of the information that is exported > through debugfs: Applied to 4.16/scsi-fixes, thanks. -- Martin K. Petersen Oracle

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

2018-01-08 Thread Martin K. Petersen
Jens, > Completely up to you - I already have 1-5, I can add 6/7 as well, or > just can do it in your tree. Let me know what you prefer. Started my 4.16/scsi-fixes branch early based on your tree. I queued these two up. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 1/2] ata: enhance the definition of SET MAX feature field value

2018-01-08 Thread Martin K. Petersen
Tejun, Are you OK with me pulling this change through the SCSI tree? > There are two other values for SET MAX feature field according to ata > protocol. So definite them. > > Signed-off-by: Xiang Chen > Signed-off-by: John Garry > --- > include/linux/ata.h | 2 ++ > 1 file changed, 2 insertio

Re: [PATCH v3 0/5] scsi_debug: add write scattered support

2018-01-08 Thread Martin K. Petersen
Douglas, > While testing the WRITE SCATTERED command support in a new sg3_utils > utility (sg_write_x) it was helpful to have a target that supported > this command. This command might be attractive to other kernel > subsystems. Even if end devices don't support this command yet, it > would most

Re: [PATCH] scsi: smartpqi: allow static build ("built-in")

2018-01-08 Thread Martin K. Petersen
Steffen, > If CONFIG_SCSI_SMARTPQI=y then don't build this driver as a module. Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 7/9] scsi: bnx2fc: Use zeroing allocator rather than allocator/memset

2018-01-08 Thread Martin K. Petersen
Himanshu, > scsi: qedi: Use zeroing allocator instead of allocator/memset --Resend > scsi: mvsas: Use zeroing allocator rather than allocator/memset > scsi: fnic: Use zeroing allocator rather than allocator/memset > scsi: dpt_i2o: Use zeroing allocator rather than allocator/memset > scsi: bnx2fc:

Re: [PATCH 1/2] ata: enhance the definition of SET MAX feature field value

2018-01-08 Thread Tejun Heo
On Mon, Jan 08, 2018 at 10:16:55PM -0500, Martin K. Petersen wrote: > > Tejun, > > Are you OK with me pulling this change through the SCSI tree? Sure, yeah, please go ahead. Thanks. -- tejun

Re: [PATCH 0/2] Change frame type for SET MAX commands

2018-01-08 Thread Martin K. Petersen
chenxiang, > According to ATA protocol, there are two other values for SET MAX commands' > feature field. So definite them. Also those SET MAX commands belong to > different frame types,and judge feature field of SET MAX commands to decide > which frame type they belongs to. Applied to 4.16/sc

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

2018-01-08 Thread Jason Yan
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 Reinecke --- drivers/scsi/libsas/sas_scsi_host.c | 22 +++--- 1 file

Re: [PATCH 1/4] blk-mq: Rename request_queue.mq_freeze_wq into mq_wq

2018-01-08 Thread Hannes Reinecke
On 01/08/2018 07:50 PM, Bart Van Assche wrote: > Rename a waitqueue in struct request_queue since the next patch will > add code that uses this waitqueue outside the request queue freezing > implementation. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig > Cc: Hannes Reinecke > Cc: J

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

2018-01-08 Thread Hannes Reinecke
On 01/08/2018 07:50 PM, Bart Van Assche wrote: > Introduce functions that allow block drivers to wait while a request > queue is in the quiesced state (blk-mq) or in the stopped state (legacy > block layer). The next patch will add calls to these functions in the > SCSI core. > > Signed-off-by: Ba

Re: [PATCH 3/4] scsi: Avoid that .queuecommand() gets called for a quiesced SCSI device

2018-01-08 Thread Hannes Reinecke
On 01/08/2018 07:50 PM, Bart Van Assche wrote: > Several SCSI transport and LLD drivers surround code that does not > tolerate concurrent calls of .queuecommand() with scsi_target_block() / > scsi_target_unblock(). These last two functions use > blk_mq_quiesce_queue() / blk_mq_unquiesce_queue() for

Re: [PATCH 4/4] IB/srp: Fix a sleep-in-invalid-context bug

2018-01-08 Thread Hannes Reinecke
On 01/08/2018 07:50 PM, Bart Van Assche wrote: > The previous two patches guarantee that srp_queuecommand() does not get > invoked while reconnecting occurs. Hence remove the code from > srp_queuecommand() that prevents command queueing while reconnecting. > This patch avoids that the following can

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

2018-01-08 Thread Hannes Reinecke
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 Reinecke >> --- >>   drivers/scs

[mkp-scsi:for-next 237/263] drivers/scsi/libsas/sas_discover.c:364:6: sparse: symbol 'sas_destruct_ports' was not declared. Should it be static?

2018-01-08 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next head: f7c3d0667404295422c9a5d71fd87ca20c770f49 commit: 99cfdc04c12ea1bc5719bff15f24dae8b5b90da9 [237/263] scsi: libsas: direct call probe and destruct reproduce: # apt-get install sparse git checkout 99

[RFC PATCH mkp-scsi] scsi: libsas: sas_destruct_ports() can be static

2018-01-08 Thread kbuild test robot
Fixes: 99cfdc04c12e ("scsi: libsas: direct call probe and destruct") Signed-off-by: Fengguang Wu --- sas_discover.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index 190108e..e4fd078 100644 --- a/