bug is found by my static analysis tool DSAC.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/lpfc/lpfc_mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c
index 9c22a2c93462..7eae5508bfa3 100644
--- a/drivers/scsi/lpfc
:
lpfc_sli_handle_fast_ring_event in lpfc_sli_fp_intr_handler
(interrupt handler)
Note that [FUNC_PTR] means a function pointer call is used.
To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.
This bug is found by my static analysis tool DSAC.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/lpfc/lpfc_hbadisc.c
static analysis tool DSAC.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/lpfc/lpfc_els.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 4dda969e947c..e21b360eb764 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
DSAC.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/lpfc/lpfc_mem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c
index 9c22a2c93462..20359e5d0016 100644
--- a/drivers/scsi/lpfc/lpfc_mem.c
+++ b/drivers/scsi/lpfc
On 2018/5/8 16:27, Oliver Neukum wrote:
Am Dienstag, den 08.05.2018, 15:47 +0800 schrieb Jia-Ju Bai:
The write operations to "cmnd->result" and "cmnd->scsi_done"
are protected by the lock on line 642-643, but the write operations
to these data on line 634-635 are
mnd->scsi_done".
To fix this data race, the write operations on line 634-635
should be also protected by the lock.
Signed-off-by: Jia-Ju Bai
---
drivers/usb/storage/uas.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/s
allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
which can sleep and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/st.c | 4 ++
laced with GFP_KERNEL,
which can sleep and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
imm_init is not called in an interrupt handler
nor holding a spinlock.
The function mdelay in it can be replaced with msleep,
to reduce busy wait.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/imm.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/imm.c b
imm_init is not called in an interrupt handler
nor holding a spinlock.
The function mdelay in it can be replaced with msleep,
to reduce busy wait.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/imm.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/imm.c b
by my static analysis tool(DSAC) and checked by my code
review.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/qedi/qedi_fw.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c
index bd302d3..20a9259 100644
--- a/driv
On 2017/12/13 12:42, James Bottomley wrote:
On Wed, 2017-12-13 at 11:18 +0800, Jia-Ju Bai wrote:
The driver may sleep under a spinlock.
The function call paths are:
qlt_handle_abts_recv_work (acquire the spinlock)
qlt_response_pkt_all_vps
qlt_response_pkt
de review.
Thanks,
Jia-Ju Bai
From: Jia-Ju Bai
The driver may sleep under a spinlock, and the function call paths are:
arcmsr_queue_command(acquire the spinlock)
arcmsr_queue_command_lck
arcmsr_handle_virtual_command
arcmsr_iop_message_xfer
arcmsr_iop_parking
arcmsr_stop_adapter_bgrb
schedule_timeout_interruptible --> may sleep
To fix it, schedule_timeout_uninterruptible is replaced with mdelay.
This bug is found by my static analysis tool(DSAC) and checked by my code
review.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/esas2r/esas2r_main.c |2 +-
1 file changed, 1 insertion(+)
esas2r_flash_access
schedule_timeout_interruptible --> may sleep
To fix it, schedule_timeout_uninterruptible is replaced with mdelay.
This bug is found by my static analysis tool(DSAC) and checked by my code
review.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/esas2r/esas2r_flas
do not find a good way to fix it, so I only report.
This possible bug is found by my static analysis tool (DSAC) and checked
by my code review.
Thanks,
Jia-Ju Bai
replaced with mdelay.
This bug is found by my static analysis tool(DSAC) and checked by my code
review.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/esas2r/esas2r_init.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/esas2r/esas2r_init.c
b/drivers
Thanks for your reply :)
On 2017/12/12 11:38, Finn Thain wrote:
On Tue, 12 Dec 2017, Jia-Ju Bai wrote:
From: Jia-Ju Bai
The kernel module may sleep under a spinlock.
The spinlock is always taken in irq mode, and the
schedule_timeout_uninterruptible() is conditional on !irqs_disabled().
I
my static analysis tool (DSAC) and checked
by my code review.
Thanks,
Jia-Ju Bai
cmd
wait_for_completion --> may sleep (&hrrq->_lock is still held)
I do not find a good way to fix them, so I only report.
These possible bugs are found by my static analysis tool (DSAC) and
checked by my code review.
Thanks,
Jia-Ju Bai
From: Jia-Ju Bai
The kernel module may sleep under a spinlock.
The function call paths are:
NCR5380_select (acquire the spinlock)
NCR5380_reselect
NCR5380_poll_politely
NCR5380_poll_politely2
schedule_timeout_uninterruptible --> may sleep
NCR5380_abort (acquire the spinl
by my static analysis tool (DSAC) and checked
by my code review.
Thanks,
Jia-Ju Bai
quot; with
"mdelay".
If this fixing is correct, I can send a patch.
This possible bug is found by my static analysis tool (DSAC) and checked
by my code review.
Thanks,
Jia-Ju Bai
with
"mdelay".
If this fixing is correct, I can send a patch.
This possible is found by my static analysis tool (DSAC) and checked by
my code review.
Thanks,
Jia-Ju Bai
Thanks,
Jia-Ju Bai
p_parking
arcmsr_stop_adapter_bgrb
arcmsr_hbaD_stop_bgrb
arcmsr_hbaD_wait_msgint_ready
msleep --> may sleep
To fix them, msleep is replaced with mdelay.
These bugs are found by my static analysis tool and my code review.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/arcmsr/
logoff
mutex_lock --> may sleep
These bugs are found by my static analysis tool and my code review.
Thanks,
Jia-Ju Bai
rports
fc_rport_logoff
mutex_lock --> may sleep
These bugs are found by my static analysis tool and my code review.
Thanks,
Jia-Ju Bai
his function.
This bug is found by my static analysis tool and my code review.
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/fnic/fnic_fcs.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 999fc75..4c99c96 100644
--- a/driv
;schedule" and "cpu_relax".
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/qla4xxx/ql4_glbl.h |2 +-
drivers/scsi/qla4xxx/ql4_nx.c |8 +---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h
index bc
On 06/01/2017 02:21 PM, Nicholas A. Bellinger wrote:
Hi Jia-Ju,
On Wed, 2017-05-31 at 11:26 +0800, Jia-Ju Bai wrote:
The driver may sleep under a spin lock, and the function call path is:
iscsit_tpg_enable_portal_group (acquire the lock by spin_lock)
iscsi_update_param_value
kstrdup
On 05/31/2017 06:18 PM, Sumit Saxena wrote:
-Original Message-
From: Jia-Ju Bai [mailto:baijiaju1...@163.com]
Sent: Wednesday, May 31, 2017 8:27 AM
To: kashyap.de...@broadcom.com; sumit.sax...@broadcom.com;
shivasharan.srikanteshw...@broadcom.com; j...@linux.vnet.ibm.com;
martin.peter
;schedule" and "cpu_relax".
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/qla4xxx/ql4_glbl.h |2 +-
drivers/scsi/qla4xxx/ql4_nx.c |8 +---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h
index bc
The driver may sleep under a spin lock, and the function call path is:
iscsit_tpg_enable_portal_group (acquire the lock by spin_lock)
iscsi_update_param_value
kstrdup(GFP_KERNEL) --> may sleep
To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC".
Si
The driver may sleep under a spin lock, and the function call path is:
mraid_mm_attach_buf (acquire the lock by spin_lock_irqsave)
pci_pool_alloc(GFP_KERNEL) --> may sleep
To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC".
Signed-off-by: Jia-Ju Bai
---
;schedule" and "cpu_relax".
Signed-off-by: Jia-Ju Bai
---
drivers/scsi/qla4xxx/ql4_nx.c |8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index e91abb3..1cf5f4a 100644
--- a/drivers/scsi/qla
37 matches
Mail list logo