[PATCH 0/3] hisi_sas: some CQ processing fixes

2017-01-03 Thread John Garry
This patchset fixes some issues related to servicing of the completion queue interrupt. The major fix is that sensitive hisi_hba structures need to be locked when free'ing a slot. Another modification is that the v2 hw completion queue irq is now serviced with a tasklet, as too much work was being

[PATCH 2/3] scsi: hisi_sas: lock sensitive regions when servicing CQ interrupt

2017-01-03 Thread John Garry
There is a bug in the current driver in that certain hisi_hba and port structure elements which we access when servicing the CQ interrupt do not use thread-safe accesses; these include hisi_sas_port linked-list of active slots (hisi_sas_port.entry), bitmap of currently allocated IPTT (in

[PATCH 3/3] scsi: hisi_sas: lock sensitive region in hisi_sas_slot_abort()

2017-01-03 Thread John Garry
When we call hisi_sas_slot_task_free() we should grab the hisi_hba.lock, as hisi_sas_slot_task_free() accesses common hisi_hba elements. Function hisi_sas_slot_abort() is missing this, so add it. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++

[PATCH 1/3] scsi: hisi_sas: service v2 hw CQ ISR with tasklet

2017-01-03 Thread John Garry
Currently the all the slot processing for the completion queue is done in ISR context. It is judged that the slot processing can take a long time, especially when a SATA NCQ completes (upto 32 slots). So, as a solution, defer the bulk of the ISR processing to tasklet context. Each CQ will have

Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2017-01-03 Thread Jan Kara
On Mon 02-01-17 16:11:36, Johannes Weiner wrote: > On Fri, Dec 23, 2016 at 03:33:29AM -0500, Johannes Weiner wrote: > > On Fri, Dec 23, 2016 at 02:32:41AM -0500, Johannes Weiner wrote: > > > On Thu, Dec 22, 2016 at 12:22:27PM -0800, Hugh Dickins wrote: > > > > On Wed, 21 Dec 2016, Linus Torvalds

Re: [PATCH] scsi: ufs-qcom: Fix module autoload

2017-01-03 Thread Subhash Jadavani
On 2017-01-02 06:04, Javier Martinez Canillas wrote: If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the

Re: [PATCH 2/3] scsi: hisi_sas: lock sensitive regions when servicing CQ interrupt

2017-01-03 Thread zhangfei
On 2017年01月03日 20:24, John Garry wrote: There is a bug in the current driver in that certain hisi_hba and port structure elements which we access when servicing the CQ interrupt do not use thread-safe accesses; these include hisi_sas_port linked-list of active slots (hisi_sas_port.entry),

Re: iscsi_trx going into D state

2017-01-03 Thread Robert LeBlanc
With the last patch it is getting hung up on wait_for_completion in target_wait_for_sess_cmds. I don't know what t_state or fabric state mean. To me it looks like a queue is not being emptied, but it would help if someone confirmed this and has some pointers on how to properly flush them when the

Re: [PATCH 3/3] scsi: hisi_sas: lock sensitive region in hisi_sas_slot_abort()

2017-01-03 Thread zhangfei
On 2017年01月03日 20:24, John Garry wrote: When we call hisi_sas_slot_task_free() we should grab the hisi_hba.lock, as hisi_sas_slot_task_free() accesses common hisi_hba elements. Function hisi_sas_slot_abort() is missing this, so add it. Signed-off-by: John Garry

Re: [PATCH] scsi/bfa: use designated initializers

2017-01-03 Thread Kees Cook
On Wed, Dec 21, 2016 at 12:33 AM, Christoph Hellwig wrote: > On Fri, Dec 16, 2016 at 05:05:15PM -0800, Kees Cook wrote: >> Prepare to mark sensitive kernel structures for randomization by making >> sure they're using designated initializers. These were identified during >>

[PATCH v2] scsi: esas2r: Fix format string type mistakes

2017-01-03 Thread Kees Cook
From: Emese Revfy This adds the missing __printf attribute which allows compile time format string checking (and will be used by the coming initify gcc plugin). Additionally, this fixes the warnings exposed by the attribute. Signed-off-by: Emese Revfy

Re: [PATCH 1/3] scsi: hisi_sas: service v2 hw CQ ISR with tasklet

2017-01-03 Thread zhangfei
On 2017年01月03日 20:24, John Garry wrote: Currently the all the slot processing for the completion queue is done in ISR context. It is judged that the slot processing can take a long time, especially when a SATA NCQ completes (upto 32 slots). So, as a solution, defer the bulk of the ISR

[LSF/MM TOPIC ATTEND] kernel booting using remote storage is a mess

2017-01-03 Thread Lee Duncan
The process of booting a Linux kernel with remote storage (such as iSCSI or FCoE) seems unnecessarily complicated if end users can even figure out how to do it. This is of course exacerbated by the fact that every company seems to CNA cards differently despite the iBFT standard. If you add

Re: [PATCH] target/user: Fix use-after-free cmd->se_cmd if the cmd is expired

2017-01-03 Thread Mike Christie
On 01/03/2017 02:46 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > This is another use-after-free bug, the crash Call Trace is like: > [ 368.909498] RIP: 0010:[] [] > memcpy+0x16/0x110 > .. > [ 368.909547] Call Trace: > [ 368.909550] []

Re: [PATCH 0/3] hisi_sas: some CQ processing fixes

2017-01-03 Thread Hanjun Guo
On 2017/1/3 20:24, John Garry wrote: This patchset fixes some issues related to servicing of the completion queue interrupt. The major fix is that sensitive hisi_hba structures need to be locked when free'ing a slot. Another modification is that the v2 hw completion queue irq is now serviced

Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-03 Thread Jason Baron
On 01/01/2017 12:39 PM, James Bottomley wrote: On Sun, 2017-01-01 at 11:33 -0500, David Miller wrote: From: Bart Van Assche Date: Sun, 1 Jan 2017 14:22:11 + My recommendation is to revert commit 18f6084a989b ("scsi: mpt3sas: Fix secure erase premature

Re: iscsi_trx going into D state

2017-01-03 Thread Robert LeBlanc
With this patch I'm not seeing the __ib_drain_sq backtraces, but I'm still seeing the previous backtraces. diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 6dd43f6..1e53502 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++