RE: [PATCH v3] scsi: ufs: fix broken hba->outstanding_tasks

2019-08-19 Thread Avri Altman
> > Currently bits in hba->outstanding_tasks are cleared only after their > corresponding task management commands are successfully done by > __ufshcd_issue_tm_cmd(). > > If timeout happens in a task management command, its corresponding > bit in hba->outstanding_tasks will not be cleared until n

[PATCH] scsi: fcoe: fix null-ptr-deref Read in fc_release_transport

2019-08-19 Thread zhengbin
In fcoe_if_init, if fc_attach_transport(&fcoe_vport_fc_functions) fails, need to free the previously memory and return fail, otherwise will trigger null-ptr-deref Read in fc_release_transport. fcoe_exit fcoe_if_exit fc_release_transport(fcoe_vport_scsi_transport) Reported-by: Hulk Robot Si

Re: [PATCH 00/42] lpfc: Update lpfc to revision 12.4.0.0

2019-08-19 Thread Martin K. Petersen
James, > Update lpfc to revision 12.4.0.0 Applied to 5.4/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering

[PATCH] qla2xxx: Fix a recently introduced kernel warning

2019-08-19 Thread Bart Van Assche
According to the firmware documentation a status type 0 IOCB can be followed by one or more status continuation type 0 IOCBs. Hence do not complain if the completion function is not called from inside the status type 0 IOCB handler. WARNING: CPU: 10 PID: 425 at drivers/scsi/qla2xxx/qla_isr.c:2784

Re: [PATCH] scsi: ufs-qcom: Make structure ufs_hba_qcom_vops constant

2019-08-19 Thread Martin K. Petersen
Nishka, > Static structure ufs_hba_qcom_vops, of type ufs_hba_variant_ops, is used > only once, when it is passed as the second argument to function > ufshcd_pltfrm_init(). In the definition of ufshcd_pltfrm_init(), its > second parameter (corresponding to ufs_hba_qcom_vops) is declared as > con

Re: [PATCH v3] lpfc: Mitigate high memory pre-allocation by SCSI-MQ

2019-08-19 Thread Martin K. Petersen
James, > When SCSI-MQ is enabled, the SCSI-MQ layers will do pre-allocation of > MQ resources based on shost values set by the driver. In newer cases > of the driver, which attempts to set nr_hw_queues to the cpu count, > the multipliers become excessive, with a single shost having SCSI-MQ > pre

Re: [PATCH] scsi: lpfc: use spin_lock_irqsave instead of spin_lock_irq in IRQ context

2019-08-19 Thread Martin K. Petersen
Fuqian, > As spin_unlock_irq will enable interrupts. > Function lpfc_findnode_rpi is called from > lpfc_sli_abts_err_handler (./drivers/scsi/lpfc/lpfc_sli.c) > <- lpfc_sli_async_event_handler > <- lpfc_sli_process_unsol_iocb > <- lpfc_sli_handle_fast_ring_event > <- lpfc_sli_fp_intr_hand

Re: [PATCH] scsi: lpfc: remove redundant code

2019-08-19 Thread Martin K. Petersen
Fuqian, > Remove the redundant initialization code. Applied to 5.4/scsi-queue, thanks. -- Martin K. Petersen Oracle Linux Engineering

[PATCH v3] scsi: ufs: fix broken hba->outstanding_tasks

2019-08-19 Thread Stanley Chu
Currently bits in hba->outstanding_tasks are cleared only after their corresponding task management commands are successfully done by __ufshcd_issue_tm_cmd(). If timeout happens in a task management command, its corresponding bit in hba->outstanding_tasks will not be cleared until next task manage

RE: [PATCH v2 0/3] scsi: ufs: fix broken hba->outstanding_tasks

2019-08-19 Thread Stanley Chu
Hi Avri, On Thu, 2019-07-25 at 16:52 +0800, Stanley Chu wrote: > Hi Avri, > > On Thu, 2019-07-25 at 07:54 +, Avri Altman wrote: > > Stanly, > > > > > > > > Currently bits in hba->outstanding_tasks are cleared only after their > > > corresponding task management commands are successfully don

Re: [PATCH 4.19-stable] SCSI: fix queue cleanup race before scsi_requeue_run_queue is done

2019-08-19 Thread zhengbin (A)
On 2019/8/19 12:08, Ming Lei wrote: > On Mon, Aug 19, 2019 at 10:39:05AM +0800, zhengbin wrote: >> KASAN reports a use-after-free in 4.19-stable, >> which won't happen after commit 47cdee29ef9d >> ("block: move blk_exit_queue into __blk_release_queue"). >> However, backport this patch to 4.19-sta

Re: [PATCH] scsi: ufs-qcom: Make structure ufs_hba_qcom_vops constant

2019-08-19 Thread Vivek Gautam
On Mon, Aug 19, 2019 at 1:26 PM Nishka Dasgupta wrote: > > Static structure ufs_hba_qcom_vops, of type ufs_hba_variant_ops, is used > only once, when it is passed as the second argument to function > ufshcd_pltfrm_init(). In the definition of ufshcd_pltfrm_init(), its > second parameter (correspon

[PATCH] scsi: ufs-qcom: Make structure ufs_hba_qcom_vops constant

2019-08-19 Thread Nishka Dasgupta
Static structure ufs_hba_qcom_vops, of type ufs_hba_variant_ops, is used only once, when it is passed as the second argument to function ufshcd_pltfrm_init(). In the definition of ufshcd_pltfrm_init(), its second parameter (corresponding to ufs_hba_qcom_vops) is declared as constant. Hence declare

[PATCH] scsi: bfa: bfa_fcpim: Make structure cmnd_z0 constant

2019-08-19 Thread Nishka Dasgupta
Static structure cmnd_z0, of type fcp_cmnd_s, is only used when being copied into another variable. Hence make it constant to protect it from modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/scsi/bfa/bfa_fcpim.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH] SCSI: esas2r: Make structure default_sas_nvram constant

2019-08-19 Thread Nishka Dasgupta
Static structure default_sas_nvram, of type esas2r_sas_nvram, is used only when copied to a local variable; it is never modified itself. Hence make it constant to protect it from unintended modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/scsi/esas2r/esas2r_f