[PATCH] ext2/super: Fix a possible sleep-in-atomic bug in parse_options

2017-10-06 Thread Jia-Ju Bai
ode review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- lib/parser.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parser.c b/lib/parser.c index 3278958..bc6e2ce 100644 --- a/lib/parser.c +++ b/lib/parser.c @@ -133,7 +133,7 @@ static int match_number(su

[BUG] fs/dlm: A possible sleep-in-atomic bug in dlm_master_lookup

2017-10-06 Thread Jia-Ju Bai
my static analysis tool and my code review. Thanks, Jia-Ju Bai

[BUG] fs/aio: A possible sleep-in-atomic bug in aio_migratepage

2017-10-06 Thread Jia-Ju Bai
code review. A possible fix is to remove cond_resched in __copy_gigantic_page. Thanks, Jia-Ju Bai

[PATCH] scsi/fnic: Fix a sleep-in-atomic bug in fnic_handle_event

2017-10-02 Thread Jia-Ju Bai
ter this function. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- 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

[BUG] scsi/fcoe: Sleep-in-atomic bugs in fcoe driver

2017-10-02 Thread Jia-Ju Bai
logoff mutex_lock --> may sleep These bugs are found by my static analysis tool and my code review. Thanks, Jia-Ju Bai

[BUG] scsi/libfc: Sleep-in-atomic bugs in libfc

2017-10-02 Thread 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

[BUG] fs/dcache: might_sleep is called under a spinlock

2017-10-02 Thread Jia-Ju Bai
According to fs/dcache.c, might_sleep is called under a spinlock, and the function call path is: d_prune_aliases (acquire the spinlock) dput might_sleep This bug is found by my static analysis tool and my code review. A possible fix is to remove might_sleep in dput. Thanks, Jia-Ju Bai

[PATCH] block/drbd: Fix a sleep-in-atomic bug in drbd_bcast_event

2017-10-03 Thread Jia-Ju Bai
my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- drivers/block/drbd/drbd_nl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index a12f77e..713c965 100644 ---

[PATCH] block/drbd: Fix a sleep-in-atomic bug in notify_helper

2017-10-03 Thread Jia-Ju Bai
tic analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- drivers/block/drbd/drbd_nl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index a12f77e..ad093da 100644 --- a/driv

[BUG] drbd/block: A sleep-in-atomic bug in notify_helper

2017-10-03 Thread Jia-Ju Bai
my static analysis tool and my code review. Thanks, Jia-Ju Bai

Re: [BUG] fs/dcache: might_sleep is called under a spinlock

2017-10-03 Thread Jia-Ju Bai
Thanks for your detailed explanation :) I will improve my static analysis tool. Thanks, Jia-Ju Bai On 2017/10/3 11:19, Al Viro wrote: On Tue, Oct 03, 2017 at 10:38:25AM +0800, Jia-Ju Bai wrote: According to fs/dcache.c, might_sleep is called under a spinlock, and the function call path

[PATCH] sound/pci/riptide or drivers/base/firmware: Fix a possible sleep-in-atomic bug

2017-10-08 Thread Jia-Ju Bai
) _request_firmware_prepare kzalloc(GFP_KERNEL) --> may sleep To fix it, GFP_KERNEL is replaced with GFP_ATOMIC in _request_firmware_prepare. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- dri

[BUG] vt6655: A possible sleep-in-atomic bug in vt6655_suspend

2017-10-08 Thread Jia-Ju Bai
lay in __pci_start_power_transition in drivers/pci/pci.c. This bug is found by my static analysis tool and my code review. Thanks, Jia-Ju Bai

[BUG] sound/core/seq: A possible sleep-in-atomic bug in snd_virmidi_dev_receive_event

2017-10-08 Thread Jia-Ju Bai
According to seq_virmidi.c, the driver may sleep under a read spinlock. The function call path is: snd_virmidi_dev_receive_event (acquire the spinlock) snd_seq_dump_var_event copy_from_user --> may sleep This bug is found by my static analysis tool and my code review. Thanks, Jia-Ju Bai

[BUG] ssb: Possible sleep-in-atomic bugs in ssb_pcmcia_read8

2017-10-08 Thread Jia-Ju Bai
ock --> may sleep A possible fix is to use spinlock instead of mutex lock in pcmcia_access_config in drivers/pcmcia/pcmcia_resource.c. These bugs are found by my static analysis tool and my code review. Thanks, Jia-Ju Bai

[PATCH] opl3: Fix a possible sleep-in-atomic bug in snd_opl3_find_patch

2017-10-08 Thread Jia-Ju Bai
off-by: Jia-Ju Bai <baijiaju1...@163.com> --- sound/drivers/opl3/opl3_synth.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c index ddcc1a3..2e1cb2b 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/soun

[PATCH] fs/cachefiles: Fix a possible sleep-in-atomic bug in cachefiles_printk_object

2017-10-08 Thread Jia-Ju Bai
ode review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- fs/cachefiles/namei.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 3978b32..39e1504 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c

Re: [BUG] mm/vmalloc: ___might_sleep is called under a spinlock in __purge_vmap_area_lazy

2017-10-08 Thread Jia-Ju Bai
Thanks for your reply and explanation :) I will improve my analysis. Thanks, Jia-Ju Bai On 2017/10/9 12:10, Kirill A. Shutemov wrote: On Mon, Oct 09, 2017 at 12:00:33PM +0800, Jia-Ju Bai wrote: The ___might_sleep is called under a spinlock, and the function call graph

[BUG] mm/vmalloc: ___might_sleep is called under a spinlock in __purge_vmap_area_lazy

2017-10-08 Thread Jia-Ju Bai
___might_sleep in cond_resched_lock. This bug is found by my static analysis tool and my code review. Thanks, Jia-Ju Bai

[BUG] fs/afs/flock: possible sleep-in-atomic bugs in afs_do_setlk

2017-10-07 Thread Jia-Ju Bai
; again after them. These bugs are found by my static analysis tool and my code review. Thanks, Jia-Ju Bai

A question of "cond_resched_lock" called in atomic context

2017-10-07 Thread Jia-Ju Bai
uot; and "__cond_resched_lock". I know that "__cond_resched_lock" is safe and okay to be called when holding a spinlock. However, I think "___might_sleep" can be removed, because it prints error messages in this situation, but it is safe in fact. Am I right? I am looking forward to your comments :) Thanks, Jia-Ju Bai

[BUG] fs/super: a possible sleep-in-atomic bug in put_super

2017-10-06 Thread Jia-Ju Bai
t; may sleep This bug is found by my static analysis tool and my code review. Thanks, Jia-Ju Bai

[PATCH] fs/afs/flock and fs/locks: Fix possible sleep-in-atomic bugs in posix_lock_file

2017-10-07 Thread Jia-Ju Bai
ile posix_lock_inode (fs/locks.c) locks_get_lock_context kmem_cache_alloc(GFP_KERNEL) --> may sleep To fix them, GFP_KERNEL is replaced with GFP_ATOMIC. These bugs are found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> ---

Re: [alsa-devel] [PATCH] opl3: Fix a possible sleep-in-atomic bug in snd_opl3_find_patch

2017-10-09 Thread Jia-Ju Bai
Thanks for your reply :) Yes, you are right. Sorry for this false positive. Thanks, Jia-Ju Bai On 2017/10/9 14:32, Clemens Ladisch wrote: Jia-Ju Bai wrote: The driver may sleep under a spinlock, and the function call path is: snd_opl3_note_on (acquire the spinlock) snd_opl3_find_patch

Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Jia-Ju Bai
Oh, sorry, I will send the patches for each driver. Thanks, Jia-Ju Bai On 2017/10/9 16:17, Greg KH wrote: On Mon, Oct 09, 2017 at 04:16:20PM +0800, Jia-Ju Bai wrote: The drivers vt6655 and gma500 call pci_set_power_state under a spinlock, which may sleep. The function call paths

[PATCH] vt6655: Fix a possible sleep-in-atomic bug in vt6655_suspend

2017-10-09 Thread Jia-Ju Bai
und by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- drivers/staging/vt6655/device_main.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_mai

[PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Jia-Ju Bai
hese bugs are found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- drivers/pci/pci.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 6078dfc..7b763a3 100644 --- a/drivers/pci/pci.

[PATCH] gma500: Fix possible sleep-in-atomic bugs in gma_power_begin

2017-10-09 Thread Jia-Ju Bai
x them, the spinlock is released before gma_resume_pci, and it is acquired again after gma_resume_pci. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> --- drivers/gpu/drm/gma500/power.c |2 ++ 1 file changed, 2 insertions(+)

Re: [BUG] vt6655: A possible sleep-in-atomic bug in vt6655_suspend

2017-10-09 Thread Jia-Ju Bai
Okay, I will send a patch :) Thanks, Jia-Ju Bai On 2017/10/9 13:43, Greg KH wrote: On Mon, Oct 09, 2017 at 09:10:28AM +0800, Jia-Ju Bai wrote: According to device_main.c, the driver may sleep under a spinlock, and the function call path is: vt6655_suspend (acquire the spinlock

[PATCH] qedi: Fix a possible sleep-in-atomic bug in qedi_process_tmf_resp

2017-12-13 Thread Jia-Ju Bai
und by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- 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

[BUG] kaweth: a possible sleep-in-atomic bug in kaweth_start_xmit

2017-12-13 Thread Jia-Ju Bai
eep usb_kill_urb --> may sleep I 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

[PATCH] bluecard: Fix a possible sleep-in-atomic bug in bluecard_write_wakeup

2017-12-13 Thread Jia-Ju Bai
my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/bluetooth/bluecard_cs.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index d513ef4..82437a6 100644 --- a/drivers/

[PATCH 1/2] qla3xxx: Fix a possible sleep-in-atomic bug in ql_sem_spinlock

2017-12-13 Thread Jia-Ju Bai
is bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/net/ethernet/qlogic/qla3xxx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/

[PATCH 2/2] qla3xxx: Fix a possible sleep-in-atomic bug in ql_wait_for_drvr_lock

2017-12-13 Thread Jia-Ju Bai
off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/net/ethernet/qlogic/qla3xxx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c index 8ad3e24..7994d04 100644 --- a/drivers/net/ethernet/qlogic/

[BUG] tulip/de4x5: a possible sleep-in-atomic bug in de4x5_interrupt

2017-12-13 Thread Jia-Ju Bai
tic analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[BUG] atlx: a possible sleep-in-atomic bug in atl1_intr

2017-12-13 Thread Jia-Ju Bai
ode review. Thanks, Jia-Ju Bai

[PATCH 2/2] hp100: Fix a possible sleep-in-atomic bug in hp100_down_vg_link

2017-12-13 Thread Jia-Ju Bai
und by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/net/ethernet/hp/hp100.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/et

[PATCH 1/2] hp100: Fix a possible sleep-in-atomic bug in hp100_login_to_vg_hub

2017-12-13 Thread Jia-Ju Bai
sis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/net/ethernet/hp/hp100.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c index c8c7ad2

[PATCH] macb: Fix a possible sleep-in-atomic bug in macb_tx_error_task

2017-12-13 Thread Jia-Ju Bai
ned-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/net/ethernet/cadence/macb_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 72a67f7..b02c806 100644 --- a/drivers/net

Re: [PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-16 Thread Jia-Ju Bai
Hi, On 2017/12/15 22:51, Fabien DESSENNE wrote: Hi On 12/12/17 14:47, Jia-Ju Bai wrote: The driver may sleep under a spinlock. The function call path is: bdisp_device_run (acquire the spinlock) bdisp_hw_reset msleep --> may sleep To fix it, msleep is replaced with mdelay. Ma

[PATCH V2 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-16 Thread Jia-Ju Bai
iew. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/media/platform/sti/bdisp/bdisp-hw.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/sti/bdisp/bdisp-hw.c b/drivers/media/platform/sti/bdisp/bdisp-hw.c index b7892f3

[PATCH] hv: Fix unnecessary sleeping in hv_synic_alloc

2017-12-18 Thread Jia-Ju Bai
The kzalloc function is called with GFP_ATOMIC. But according to driver call graph, it is not in atomic context, namely no spinlock is held nor in an interrupt handler. This GFP_ATOMIC is unnecessary, and replace with GFP_KERNEL. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- driv

[PATCH] staging: vt6655: Use GFP_KERNEL in kzalloc

2017-12-18 Thread Jia-Ju Bai
Four kzalloc functions are called with GFP_ATOMIC. But according to driver call graph, they are not in atomic context, namely no spinlock is held nor in an interrupt handler. All these "GFP_ATOMIC"s are unnecessary, and replace with with "GFP_KERNEL"s. Signed-off-by: J

[PATCH V2] hyper-v: use GFP_KERNEL for hv_context.hv_numa_map

2017-12-18 Thread Jia-Ju Bai
The kzalloc function is called with GFP_ATOMIC. But according to driver call graph, it is not in atomic context, namely no spinlock is held nor in an interrupt handler. This GFP_ATOMIC is unnecessary, and replace with GFP_KERNEL. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- driv

Re: [PATCH] hv: Fix unnecessary sleeping in hv_synic_alloc

2017-12-18 Thread Jia-Ju Bai
On 2017/12/18 16:54, Vitaly Kuznetsov wrote: Jia-Ju Bai <baijiaju1...@gmail.com> writes: The kzalloc function is called with GFP_ATOMIC. But according to driver call graph, it is not in atomic context, namely no spinlock is held nor in an interrupt handler. This GFP_ATOMIC is unnec

[PATCH 2/2] rtc-r7301: Fix a possible sleep-in-atomic bug in rtc7301_set_time

2017-12-13 Thread Jia-Ju Bai
The driver may sleep under a spinlock. The function call path is: rtc7301_set_time (acquire the spinlock) usleep_range --> may sleep To fix it, usleep_range is replaced with udelay. This bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju

[PATCH 1/2] rtc-r7301: Fix a possible sleep-in-atomic bug in rtc7301_read_time

2017-12-13 Thread Jia-Ju Bai
iew. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/rtc/rtc-r7301.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-r7301.c b/drivers/rtc/rtc-r7301.c index 28d5408..d846e97 100644 --- a/drivers/rtc/rtc-r7301.c +++ b/drivers/rtc/rt

[BUG] cx88: a possible sleep-in-atomic bug in snd_cx88_switch_put

2017-12-13 Thread Jia-Ju Bai
ode review. Thanks, Jia-Ju Bai

[PATCH] drm: Fix a possible sleep-in-atomic bug in show_leaks

2017-12-13 Thread Jia-Ju Bai
SAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/gpu/drm/drm_mm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 61a1c8e..5b9965d 100644 --- a/drivers/gpu/drm

[PATCH V3 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-19 Thread Jia-Ju Bai
iew. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/media/platform/sti/bdisp/bdisp-hw.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/sti/bdisp/bdisp-hw.c b/drivers/media/platform/sti/bdisp/bdisp-hw.c inde

Re: [PATCH V2 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-19 Thread Jia-Ju Bai
On 2017/12/19 18:43, Fabien DESSENNE wrote: Hi, On 16/12/17 12:54, Jia-Ju Bai wrote: The driver may sleep under a spinlock. The function call path is: bdisp_device_run (acquire the spinlock) bdisp_hw_reset msleep --> may sleep To fix it, readl_poll_timeout_atomic is u

Re: [PATCH 1/2] hp100: Fix a possible sleep-in-atomic bug in hp100_login_to_vg_hub

2017-12-13 Thread Jia-Ju Bai
Sorry, I think I know your meaning now. Maybe we can unlock the spinlock before "schedule_timeout_interruptible" and then lock again? Like: spin_unlock(...); schedule_timeout_interruptible(1); spin_lock(...); Best wishes, Jia-Ju Bai On 2017/12/14 11:34, David Mi

Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-13 Thread Jia-Ju Bai
On 2017/12/14 0:50, Stephen Hemminger wrote: On Wed, 13 Dec 2017 15:42:56 +0800 Jia-Ju Bai <baijiaju1...@gmail.com> wrote: On 2017/12/13 13:18, Stephen Hemminger wrote: On Tue, 12 Dec 2017 20:57:01 -0500 (EST) David Miller <da...@davemloft.net> wrote: From: Stephen Hem

Re: [PATCH 1/2] hp100: Fix a possible sleep-in-atomic bug in hp100_login_to_vg_hub

2017-12-13 Thread Jia-Ju Bai
Thanks for reply :) I think I should use "udelay(10/HZ)" instead, do you think it is right? Thanks, Jia-Ju Bai On 2017/12/14 5:20, David Miller wrote: I want you to review all of your patches and resend them after you have checked them carefully. The first patch I e

Re: [PATCH 1/2] hp100: Fix a possible sleep-in-atomic bug in hp100_login_to_vg_hub

2017-12-13 Thread Jia-Ju Bai
Sorry, I made a mistake in last e-mail. Maybe "mdelay(1000/HZ)" or "udelay(100/HZ)" . Which one do you think is right? Thanks, Jia-Ju Bai On 2017/12/14 11:13, Jia-Ju Bai wrote: Thanks for reply :) I think I should use "udelay(10/HZ)" instead, do you thin

[BUG] scsi/qla2xxx: a possible sleep-in-atomic bug in qlt_get_tag

2017-12-12 Thread Jia-Ju Bai
de review. Thanks, Jia-Ju Bai

[BUG] b44: two possible sleep-in-atomic bugs in b44_set_link_ksettings and b44_ioctl

2017-12-12 Thread Jia-Ju Bai
ead mutex_lock --> may sleep 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

[BUG] renesas/ravb: two possible sleep-in-atomic bugs in ravb_set_link_ksettings and ravb_nway_reset

2017-12-12 Thread Jia-Ju Bai
set (acquire the spinlock) phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep 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

[BUG] renesas/sh_eth: two possible sleep-in-atomic bugs in sh_eth_set_link_ksettings and sh_eth_nway_reset

2017-12-12 Thread Jia-Ju Bai
set (acquire the spinlock) phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep 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

Re: [PATCH V2] hyper-v: use GFP_KERNEL for hv_context.hv_numa_map

2017-12-19 Thread Jia-Ju Bai
On 2017/12/19 1:05, Stephen Hemminger wrote: On Mon, 18 Dec 2017 17:02:52 +0800 Jia-Ju Bai <baijiaju1...@gmail.com> wrote: The kzalloc function is called with GFP_ATOMIC. But according to driver call graph, it is not in atomic context, namely no spinlock is held nor in an interrupt h

Re: [BUG] scsi/qla2xxx: a possible sleep-in-atomic bug in qlt_get_tag

2017-12-12 Thread Jia-Ju Bai
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

Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-12 Thread Jia-Ju Bai
d Miller <da...@davemloft.net> wrote: From: Jia-Ju Bai <baijiaju1...@gmail.com> Date: Tue, 12 Dec 2017 16:38:12 +0800 According to drivers/net/ethernet/marvell/skge.c, the driver may sleep under a spinlock. The function call path is: skge_remove (acquire the spinlock) free_irq --> may

[BUG] sound/soc/samsung: a possible sleep-in-atomic bugs in s3c_pcm_hw_params

2017-12-11 Thread Jia-Ju Bai
nly report. This possible bug is found by my static analysis tool (DSAC) and my code review. Thanks, Jia-Ju Bai

[BUG] fs/f2fs: a possible sleep-in-atomic bug in f2fs_trace_pid

2017-12-11 Thread Jia-Ju Bai
tic analysis tool (DSAC) and my code review. Thanks, Jia-Ju Bai

[PATCH] rtl8188eu: Fix a possible sleep-in-atomic bug in set_tx_beacon_cmd

2017-12-12 Thread Jia-Ju Bai
by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.

[BUG] vme_ca91cx42: a possible sleep-in-atomic bug in ca91cx42_master_set

2017-12-12 Thread Jia-Ju Bai
bug is found by my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[PATCH] vme: Fix a possible sleep-in-atomic bug in vme_tsi148

2017-12-12 Thread Jia-Ju Bai
ool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/vme/vme.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 8124622..92500f6 100644 --- a/drivers/vme/vme.c +++ b/drivers/

[BUG] haswell: a possible sleep-in-atomic bug in hsw_irq_thread

2017-12-12 Thread Jia-Ju Bai
ort. This possible bug is found by my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[BUG] soc/sti: a possible sleep-in-atomic bug in uni_player_ctl_iec958_put

2017-12-12 Thread Jia-Ju Bai
bug is found by my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[BUG] drivers/scsi/wd719x: a possible sleep-in-atomic bug in wd719x_host_reset

2017-12-11 Thread Jia-Ju Bai
my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[BUG] drivers/usb/host/isp116x-hcd: a possible sleep-in-atomic bug in isp116x_start

2017-12-11 Thread Jia-Ju Bai
may sleep I 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

[BUG] 3com/3c59x: two possible sleep-in-atomic bugs

2017-12-11 Thread Jia-Ju Bai
errupt (interrupt handler) vortex_error vortex_up pci_set_power_state --> may sleep pci_enable_device --> may sleep 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. Th

[BUG] drivers/gpio: some possible sleep-in-atomic bugs

2017-12-11 Thread Jia-Ju Bai
-> may sleep grgpio_irq_map (acquire the spinlock) request_irq --> may sleep grgpio_irq_unmap (acquire the spinlock) free_irq --> may sleep I do not find a good way to fix them, so I only report. These possible bugs is found by my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[BUG] drivers/tty/hvc: a possible sleep-in-atomic bug in xen_pv_console_init

2017-12-11 Thread Jia-Ju Bai
bug is found by my static analysis tool (DSAC) and my code review. Thanks, Jia-Ju Bai

[BUG] drivers/scsi/advansys: three possible sleep-in-atomic bugs in advansys_interrupt

2017-12-11 Thread Jia-Ju Bai
Thanks, Jia-Ju Bai

[PATCH] NCR5380: Fix a possible sleep-in-atomic bug in NCR5380_poll_politely2

2017-12-11 Thread Jia-Ju Bai
From: Jia-Ju Bai <baijiaju1...@gmail.com> 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 -->

[BUG] drivers/scsi/ipr: two possible sleep-in-atomic bugs

2017-12-11 Thread Jia-Ju Bai
cmd wait_for_completion --> may sleep (>_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

Re: [PATCH] NCR5380: Fix a possible sleep-in-atomic bug in NCR5380_poll_politely2

2017-12-11 Thread Jia-Ju Bai
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 <baijiaju1...@gmail.com> The kernel module may sleep under a spinlock. The spinlock is always taken in irq mode, and the schedule_timeout_uninterruptible() is condi

[BUG] drivers/scsi/dpt_i2o: a possible sleep-in-atomic bug in adpt_isr

2017-12-11 Thread 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

[BUG] drivers/scsi/dpt_i2o: a possible sleep-in-atomic bug in adpt_i2o_post_this

2017-12-11 Thread 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

[BUG] drivers/scsi/dpt_i2o: a possible sleep-in-atomic bug in adpt_i2o_status_get

2017-12-11 Thread Jia-Ju Bai
by my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[BUG] drivers/spi: a possible sleep-in-atomic bug in atmel_spi_remove

2017-12-11 Thread Jia-Ju Bai
ort. This possible bug is found by my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-12 Thread Jia-Ju Bai
SAC) and checked by my code review. Thanks, Jia-Ju Bai

[PATCH] esas2r: Fix possible sleep-in-atomic bugs in esas2r_check_adapter

2017-12-12 Thread Jia-Ju Bai
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 <baijiaju1...@163.com> --- drivers/scsi/esas2r/esas2r_init.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/

[PATCH] hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close

2017-12-12 Thread Jia-Ju Bai
off-by: Jia-Ju Bai <baijiaju1...@163.com> --- drivers/net/hippi/rrunner.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c index 8483f03..1ab97d9 100644 --- a/drivers/net/hippi/rrunner.c +++ b/drivers/net/hippi/

[BUG] drivers/scsi/esas2r: a possible sleep-in-atomic bug in esas2r_nvram_read_direct

2017-12-12 Thread Jia-Ju Bai
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

[PATCH] esas2r: Fix a possible sleep-in-atomic bug in esas2r_flash_access

2017-12-12 Thread Jia-Ju Bai
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 <baijiaju1...@163.com> --- dri

[BUG] drivers/input/misc/pcap: a possible sleep-in-atomic bug in pcap_keys_handler

2017-12-12 Thread Jia-Ju Bai
my static analysis tool (DSAC) and checked by my code review. Thanks, Jia-Ju Bai

[BUG] wl3501: a possible sleep-in-atomic bug in wl3501_reset

2017-12-12 Thread Jia-Ju Bai
SAC) and checked by my code review. Thanks, Jia-Ju Bai

[PATCH] mac80211_hwsim: Fix a possible sleep-in-atomic bug in hwsim_get_radio_nl

2017-12-12 Thread Jia-Ju Bai
off-by: Jia-Ju Bai <baijiaju1...@163.com> --- drivers/net/wireless/mac80211_hwsim.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 10b075a..f2ebf4a 100644 --- a/drivers/net/wireless/mac8021

[PATCH] esas2r: Fix a possible sleep-in-atomic bug in esas2r_wait_request

2017-12-12 Thread Jia-Ju Bai
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 <baijiaju1...@163.com> --- drivers/scsi/esas2r/esas2r_main.c |2 +- 1 file c

[BUG] sbni: a possible sleep-in-atomic bug in sbni_close

2017-12-12 Thread Jia-Ju Bai
my code review. Thanks, Jia-Ju Bai

[BUG] atmel_ssc_dai: a possible sleep-in-atomic bug in atmel_ssc_shutdown

2017-12-12 Thread Jia-Ju Bai
SAC) and checked by my code review. Thanks, Jia-Ju Bai

[PATCH] tty/isicom: Fix a possible sleep-in-atomic bug in WaitTillCardIsFree

2017-12-12 Thread Jia-Ju Bai
my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/tty/isicom.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c index 015686f..bdd3027 100644 -

[PATCH] arcmsr: Fix possible sleep-in-atomic bugs in arcmsr_queue_command

2017-12-12 Thread Jia-Ju Bai
From: Jia-Ju Bai <baijiaju1...@163.com> 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_p

[PATCH 2/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_save_request

2017-12-12 Thread Jia-Ju Bai
SAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/media/platform/sti/bdisp/bdisp-hw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/sti/bdisp/bdisp-hw.c b/drivers/media/platform/sti/bdisp/b

[PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-12 Thread Jia-Ju Bai
The driver may sleep under a spinlock. The function call path is: bdisp_device_run (acquire the spinlock) bdisp_hw_reset msleep --> may sleep To fix it, msleep is replaced with mdelay. This bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia

[PATCH] net: 8390: Fix possible data races in __ei_get_stats

2018-05-07 Thread Jia-Ju Bai
operations to "dev->stats" are protected by the spinlock, and a local variable is used for return. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/net/ethernet/8390/lib8390.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/et

Re: [PATCH] net: 8390: Fix possible data races in __ei_get_stats

2018-05-07 Thread Jia-Ju Bai
On 2018/5/7 22:15, Eric Dumazet wrote: On 05/07/2018 07:08 AM, Jia-Ju Bai wrote: The write operations to "dev->stats" are protected by the spinlock on line 862-864, but the read operations to this data on line 858 and 867 are not protected by the spinlock. Thus, there may exi

[PATCH] ata: ata_piix: Fix a possible data race in piix_pci_device_resume

2018-05-07 Thread Jia-Ju Bai
t;flags" should be also protected by the lock. Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> --- drivers/ata/ata_piix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 7ecb1322a514..c99fdf473dee 100644 -

<    1   2   3   4   5   6   7   8   9   10   >