On 2019/10/22 9:59, zhengbin (A) wrote:
> On 2019/10/21 21:06, Hannes Reinecke wrote:
>> On 10/21/19 3:49 AM, zhengbin (A) wrote:
>>> On 2019/10/18 21:43, Martin K. Petersen wrote:
>>>> Hannes,
>>>>
>>>>> The one thing which I patently don
On 2019/10/21 21:06, Hannes Reinecke wrote:
> On 10/21/19 3:49 AM, zhengbin (A) wrote:
>> On 2019/10/18 21:43, Martin K. Petersen wrote:
>>> Hannes,
>>>
>>>> The one thing which I patently don't like is the ambivalence between
>>>> DRIVER
if
>> DRIVER_SENSE is not set, but we have a valid sense code? Or the other
>> way around?
> I agree, it's a mess.
>
> (Sorry, zhengbin, you opened a can of worms. This is some of our oldest
> and most arcane code in SCSI)
>
>> But more important, from a quic
Like sd_pr_command, before use sshdr, we need to check the result of
scsi_execute and whether sshdr is valid.
Signed-off-by: zhengbin
---
drivers/scsi/sd.c | 57 ++-
1 file changed, 35 insertions(+), 22 deletions(-)
diff --git a/drivers/scsi
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute.
Signed-off-by: zhengbin
---
drivers/scsi/scsi_scan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 058079f..781f82a 100644
--- a
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute.
Signed-off-by: zhengbin
---
drivers/scsi/device_handler/scsi_dh_emc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c
b/drivers/scsi/device_handler
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute.
Signed-off-by: zhengbin
---
drivers/scsi/scsi_lib.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 5447738..2970190 100644
--- a/drivers/scsi
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute, also need to check whether sshdr is valid.
Signed-off-by: zhengbin
---
drivers/scsi/sr_ioctl.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
index
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute.
Signed-off-by: zhengbin
---
drivers/scsi/scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 4f76841..15d1fe9 100644
--- a/drivers/scsi
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute.
Signed-off-by: zhengbin
---
drivers/scsi/device_handler/scsi_dh_rdac.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c
b/drivers/scsi
Like sd_pr_command, before use sshdr, we need to check whether
sshdr is valid.
Signed-off-by: zhengbin
---
drivers/scsi/cxlflash/superpipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/cxlflash/superpipe.c
b/drivers/scsi/cxlflash/superpipe.c
index 593669a
v1->v2: modify the comments suggested by Bart
v2->v3: fix bug in sr_do_ioctl
v3->v4: let "fix bug in sr_do_ioctl" be a separate patch
v4->v5: fix uninit-value access bug in callers, not in __scsi_execute
zhengbin (13):
scsi: core: need to check the res
Like sd_pr_command, before use sshdr, we need to check whether
sshdr is valid.
Signed-off-by: zhengbin
---
drivers/scsi/ufs/ufshcd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index c28c144..5afc426 100644
--- a
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute.
Signed-off-by: zhengbin
---
drivers/scsi/device_handler/scsi_dh_hp_sw.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
b/drivers/scsi
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute.
submit_rtpg/submit_stpg
scsi_execute
Signed-off-by: zhengbin
---
drivers/scsi/device_handler/scsi_dh_alua.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/device_handler
Like sd_pr_command, before use sshdr, we need to check whether
sshdr is valid.
Signed-off-by: zhengbin
---
drivers/scsi/ch.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 76751d6..dba6fe2 100644
--- a/drivers/scsi/ch.c
Like sd_pr_command, before use sshdr, we need to check the result
of scsi_execute.
Signed-off-by: zhengbin
---
drivers/scsi/sr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 4664fdf..5c5476b 100644
--- a/drivers/scsi/sr.c
Like sd_pr_command, before use sshdr, we need to check whether
sshdr is valid.
Signed-off-by: zhengbin
---
drivers/scsi/scsi_transport_spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/scsi_transport_spi.c
b/drivers/scsi/scsi_transport_spi.c
index f866106..428f9b8 100644
On 2019/10/18 10:40, Martin K. Petersen wrote:
> zhengbin,
>
>> We can init sshdr in sr_get_events, but there have many callers of
>> scsi_execute, scsi_execute_req, we have to troubleshoot all callers,
>> the simpler way is init sshdr in __scsi_execute.
> There ar
v1->v2: modify the comments suggested by Bart
v2->v3: fix bug in sr_do_ioctl
v3->v4: let "fix bug in sr_do_ioctl" be a separate patch
zhengbin (2):
sr: need to check whether sshdr is valid in sr_do_ioctl
scsi: core: fix uninit-value access of variable sshdr
drivers/
Like other callers of scsi_execute(send_trespass_cmd, hp_sw_tur...),
we need to check whether sshdr is valid.
Signed-off-by: zhengbin
---
drivers/scsi/sr_ioctl.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
index ffcf902..335cfdd
t_events, but there have many callers of
scsi_execute, scsi_execute_req, we have to troubleshoot all callers,
the simpler way is init sshdr in __scsi_execute.
Signed-off-by: zhengbin
---
drivers/scsi/scsi_lib.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/scsi/scsi_lib.c b
On 2019/10/17 10:45, Bart Van Assche wrote:
> On 2019-10-11 20:25, zhengbin wrote:
>> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
>> index 5447738..d5e29c5 100644
>> --- a/drivers/scsi/scsi_lib.c
>> +++ b/drivers/scsi/scsi_lib.c
>> @@ -25
On 2019/10/17 8:05, Finn Thain wrote:
> On Sat, 12 Oct 2019, zhengbin wrote:
>
>> kmsan report a warning in 5.1-rc4:
>>
>> BUG: KMSAN: uninit-value in sr_get_events drivers/scsi/sr.c:207 [inline]
>> BUG: KMSAN: uninit-value in sr_check_events+0x2cf/0x1090
>>
t_events, but there have many callers of
scsi_execute, scsi_execute_req, we have to troubleshoot all callers,
the simpler way is init sshdr in __scsi_execute.
BTW: sr_do_ioctl should check whether sshdr is valid, fix this
Signed-off-by: zhengbin
---
v1->v2: modify the comments suggested by Bart
On 2019/10/12 10:06, James Bottomley wrote:
> On Sat, 2019-10-12 at 10:03 +0800, zhengbin (A) wrote:
>> On 2019/10/12 9:58, James Bottomley wrote:
>>> On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote:
>>>> BTW: we can't just init sshdr->response_code,
On 2019/10/12 9:58, James Bottomley wrote:
> On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote:
>> BTW: we can't just init sshdr->response_code, sr_do_ioctl use
>> sshdr->sense_key
> That's an actual bug, isn't it?
If we init sshdr in __scsi_execute, this will be ok
>
> James
>
>
> .
>
t_events, but there have many callers of
scsi_execute, scsi_execute_req, we have to troubleshoot all callers,
the simpler way is init sshdr in __scsi_execute.
BTW: we can't just init sshdr->response_code, sr_do_ioctl use
sshdr->sense_key
Signed-off-by: zhengbin
---
v1->v2: modify the
On 2019/10/11 1:03, Bart Van Assche wrote:
> On 10/10/19 5:05 AM, zhengbin wrote:
>> kmsan report a warning in 5.1-rc4:
>>
>> BUG: KMSAN: uninit-value in sr_get_events drivers/scsi/sr.c:207 [inline]
>> BUG: KMSAN: uninit-value in sr_check_events+0x2cf/0x1090
>>
t_events, but there have many callers of
scsi_execute, scsi_execute_req, we have to troubleshoot all callers,
the simpler way is init sshdr in __scsi_execute.
BTW: we can't just init sshdr->response_code, sr_do_ioctl use
sshdr->sense_key(Need to troubleshoot all callers)
Signed-off-by: zhe
ll gen controllers")
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/megaraid/megaraid_sas_fp.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c
b/drivers/scsi/megaraid/megaraid_sas_fp.c
index 5
Fix sparse warnings:
drivers/scsi/lpfc/lpfc_nportdisc.c:290:1: warning: symbol
'lpfc_defer_pt2pt_acc' was not declared. Should it be static?
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/lpfc/lpfc_nportdisc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
ping
On 2019/8/20 13:43, zhengbin wrote:
> 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
>
calls from host")
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/ufs/ufs-qcom.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 4473f33..02cdcef 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/ufs/ufs-qcom.c: In function ufs_qcom_pwr_change_notify:
drivers/scsi/ufs/ufs-qcom.c:808:6: warning: variable val set but not used
[-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/sc
zhengbin (2):
scsi: csiostor: remove set but not used variables
'mc_bist_status_rdata_reg','edc_bist_status_rdata_reg'
scsi: csiostor: remove set but not used variable 'rln'
drivers/scsi/csiostor/csio_hw_t5.c | 6 ++
drivers/scsi/csiostor/csio_lnode
n function csio_t5_edc_read:
drivers/scsi/csiostor/csio_hw_t5.c:199:38: warning: variable
edc_bist_status_rdata_reg set but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/csiostor/csio_hw_t5.c | 6 ++
1 file changed, 2 insertions(+), 4
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/csiostor/csio_lnode.c: In function csio_ln_init:
drivers/scsi/csiostor/csio_lnode.c:1992:21: warning: variable rln set but not
used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
dr
t-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/bnx2fc/bnx2fc_io.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 9e50e5b..da00ca5 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/dr
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bnx2fc/bnx2fc_fcoe.c: In function bnx2fc_rcv:
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:431:26: warning: variable fh set but not used
[-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/s
ed-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 16
1 file changed, 16 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 747f019..f069e09 100644
--- a/drivers/s
zhengbin (3):
scsi: bnx2fc: remove set but not used variable 'fh'
scsi: bnx2fc: remove set but not used variables 'lport','host'
scsi: bnx2fc: remove set but not used variables
'task','port','orig_task'
drivers/scsi/bnx2fc/b
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/isci/host.c: In function sci_controller_complete_io:
drivers/scsi/isci/host.c:2674:6: warning: variable index set but not used
[-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/i
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/arcmsr/arcmsr_hba.c: In function arcmsr_remap_pciregion:
drivers/scsi/arcmsr/arcmsr_hba.c:286:30: warning: variable flags set but not
used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
dr
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c: In function cq_interrupt_v1_hw:
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1542:6: warning: variable irq_value set
but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by
t-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/bfa/bfa_ioc.c | 16 +---
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 93471d7..52d1624 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bfa/bfa_fcpim.c: In function bfa_fcpim_lunmask_delete:
drivers/scsi/bfa/bfa_fcpim.c:2346:22: warning: variable rp set but not used
[-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
driver
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bfa/bfa_fcs_rport.c: In function bfa_fcs_rport_process_adisc:
drivers/scsi/bfa/bfa_fcs_rport.c:2251:21: warning: variable adisc set but not
used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
--
zhengbin (4):
scsi: bfa: remove set but not used variable 'fchs'
scsi: bfa: remove set but not used variable 'rp'
scsi: bfa: remove set but not used variable 'adisc'
scsi: bfa: remove set but not used variable 'pgoff'
drivers/scsi/bfa/bf
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bfa/bfa_svc.c: In function uf_recv:
drivers/scsi/bfa/bfa_svc.c:5528:17: warning: variable fchs set but not used
[-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/bfa/bfa_svc.c
send_async:
drivers/scsi/aic7xxx/aic7xxx_osm.c:1611:28: warning: variable targ set but not
used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/aic7xxx/aic7xxx_osm.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aic7xx
t-variable]
drivers/scsi/aic7xxx/aic79xx_osm.c: In function ahd_linux_queue_abort_cmd:
drivers/scsi/aic7xxx/aic79xx_osm.c:2155:9: warning: variable saved_scsiid set
but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/aic7xxx/aic79xx_osm.c | 9 --
ed-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/aic7xxx/aic79xx_core.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c
b/drivers/scsi/aic7xxx/aic79xx_core.c
index 7e5044b..75d94d6 10
zhengbin (3):
scsi: aic7xxx: remove set but not used variables
'ahd','paused','wait','saved_scsiid'
scsi: aic7xxx: remove set but not used variables 'ahc','targ'
scsi: aic7xxx: remove set but not used variables &
unused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/qla4xxx/ql4_nx.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 5a31877..85666fb 100644
--- a/drivers/sc
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/qla4xxx/ql4_init.c: In function ql4xxx_set_mac_number:
drivers/scsi/qla4xxx/ql4_init.c:17:10: warning: variable func_number set but
not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
--
zhengbin (3):
scsi: qla4xxx: remove set but not used variables
'data_size','poll','mask'
scsi: qla4xxx: remove set but not used variable 'func_number'
scsi: qla4xxx: remove set but not used variables
'sess','dst_addr',
ha set but not used
[-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/qla4xxx/ql4_os.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 8c674ec..49c87b0 10
t not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: zhengbin
---
drivers/scsi/megaraid/megaraid_sas_fp.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c
b/drivers/scsi/megaraid/megaraid_sas_fp.c
ind
zhengbin (2):
scsi: megaraid: remove set but not used variable 'reg_set'
scsi: megaraid: remove set but not used variables 'debugBlk','fusion'
drivers/scsi/megaraid/megaraid_sas_fp.c | 7 +--
drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 ---
2 fi
ot
Signed-off-by: zhengbin
---
drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 120e3c4..fdf6559 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusi
obot
Signed-off-by: zhengbin
---
drivers/scsi/fcoe/fcoe.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 00dd47b..2f82e56 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -125
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").
>
ead+0x1b4/0x1c0
ret_from_fork+0x10/0x18
Fixes: 8dc765d438f1 ("SCSI: fix queue cleanup race before queue initialization
is done")
Signed-off-by: zhengbin
---
drivers/scsi/scsi_lib.c | 24 ++--
drivers/scsi/scsi_sysfs.c | 3 ++-
2 files changed, 20 insertions(+), 7
On 2019/8/17 1:09, Bart Van Assche wrote:
> On 8/12/19 8:35 PM, 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").
>
> This pat
On 2019/8/15 23:40, Bart Van Assche wrote:
> On 8/14/19 6:50 PM, zhengbin (A) wrote:
>> ping
>
> Sending a "ping" after 46 hours is way too soon and only causes irritation.
> What would help though is more information about how this patch has been
> tested. Does i
read+0x6c/0x6a8
kthread+0x1b4/0x1c0
ret_from_fork+0x10/0x18
Fixes: 8dc765d438f1 ("SCSI: fix queue cleanup race before queue initialization
is done")
Signed-off-by: zhengbin
---
drivers/scsi/scsi_lib.c | 15 +++
drivers/scsi/scsi_sysfs.c | 3 ++-
2 files changed, 13 insertions
read+0x6c/0x6a8
kthread+0x1b4/0x1c0
ret_from_fork+0x10/0x18
Fixes: 8dc765d438f1 ("SCSI: fix queue cleanup race before queue initialization
is done")
Signed-off-by: zhengbin
---
drivers/scsi/scsi_lib.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/
read+0x6c/0x6a8
kthread+0x1b4/0x1c0
ret_from_fork+0x10/0x18
Fixes: 8dc765d438f1 ("SCSI: fix queue cleanup race before queue initialization
is done")
Signed-off-by: zhengbin
---
drivers/scsi/scsi_lib.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/
read+0x6c/0x6a8
kthread+0x1b4/0x1c0
ret_from_fork+0x10/0x18
Fixes: 8dc765d438f1 ("SCSI: fix queue cleanup race before queue initialization
is done")
Signed-off-by: zhengbin
---
drivers/scsi/scsi_lib.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/
ping
On 2019/3/26 21:29, zhengbin (A) wrote:
> On 2019/3/25 19:55, zhengbin (A) wrote:
>> On 2019/3/25 18:02, Pavel Tikhomirov wrote:
>>> Likely we should do the same for host_eh_scheduled++ as we do for
>>> host_failed++ in scsi_eh_inc_host_failed. Just put it
ping
On 2019/3/22 11:01, Ming Lei wrote:
> On Fri, Mar 22, 2019 at 10:56:46AM +0800, zhengbin wrote:
>> When I use dd test a SCSI device which use blk-mq in the following steps:
>> 1.echo "blocked" >/sys/block/sda/device/state
>> 2.dd if=/dev/sda of=/mnt/t.log
On 2019/3/25 19:55, zhengbin (A) wrote:
> On 2019/3/25 18:02, Pavel Tikhomirov wrote:
>> Likely we should do the same for host_eh_scheduled++ as we do for
>> host_failed++ in scsi_eh_inc_host_failed. Just put it in call_rcu. These
>> way rcu_read_lock would be enough: if
On 2019/3/25 20:20, John Garry wrote:
> On 25/03/2019 11:55, zhengbin (A) wrote:
>> On 2019/3/25 18:02, Pavel Tikhomirov wrote:
>>> Likely we should do the same for host_eh_scheduled++ as we do for
>>> host_failed++ in scsi_eh_inc_host_failed. Just put it in call_rcu.
d rcu_head in Scsi_Host,
replace scsi_schedule_eh(ap->scsi_host) with call_rcu in ata_std_sched_eh,
sas_queue_reset??
This will trigger a kernel hang or oops because of double or more call_rcu()
call.
Any more suggestions?
>
> On 3/25/19 12:05 PM, zhengbin wrote:
>> When I use f
shost_state(!=recovery)
scsi_host_set_state(SHOST_RECOVERY)
scsi_eh_wakeup(host_busy != host_failed)
atomic_dec(&shost->host_busy);
if (scsi_host_in_recovery(shost))
Add a smp_mb between host_busy and shost_state.
Signed-off-by: zhengbin
---
lock_irqrestore(shost->host_lock, flags);
}
rcu_read_unlock();
PS: commit 3bd6f43f5(use rcu_read_lock) fix the hung issue if
scsi_eh_scmd_add() is called concurrently with
scsi_host_queue_ready() while shost->host_blocked > 0
Thanks,
zhengbin
e when the resource is available.
Need to follow the rule if we set the device state to running.
Signed-off-by: zhengbin
---
drivers/scsi/scsi_sysfs.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 6a9040f..67c214a 100644
--- a
So blk_mq_run_hw_queues should still be in mutex_lock(&sdev->state_mutex)??
On 2019/3/22 10:11, Ming Lei wrote:
> On Fri, Mar 22, 2019 at 09:45:54AM +0800, zhengbin wrote:
>> When I use dd test a SCSI device which use blk-mq in the following steps:
>> 1.echo "blocked&qu
e when the resource is available.
Need to follow the rule if we set the device state to running.
Signed-off-by: zhengbin
---
drivers/scsi/scsi_sysfs.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 6a9040f..266e4c7 100644
--- a
e when the resource is available.
Need to follow the rule if we set the device state to running.
Signed-off-by: zhengbin
---
drivers/scsi/scsi_sysfs.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 6a9040f..3
e when the resource is available.
Need to follow the rule if we set the device state to running.
Signed-off-by: zhengbin
---
drivers/scsi/scsi_sysfs.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 6a9040f..c
82 matches
Mail list logo