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

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

[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 --- drivers/scsi/esas2r/esas2r_flas

[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 --- drivers/scsi/esas2r/esas2r_main.c |2 +- 1 file changed, 1 insertion(+)

[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] skge: a possible sleep-in-atomic bug in skge_remove

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

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

2017-12-12 Thread Jia-Ju Bai
-by: Jia-Ju Bai --- 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/rrunner.c @@ -1379,8 +1379,8 @@ sta

[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] wl3501: a possible sleep-in-atomic bug in wl3501_reset

2017-12-12 Thread Jia-Ju Bai
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
-by: Jia-Ju Bai --- 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/mac80211_hwsim.c +++ b/drivers/

[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

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

2017-12-12 Thread Jia-Ju Bai
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 --- 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/vme/vme.c @@ -1290,7 +129

[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 --- 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.c b/drivers/staging/rtl8188e

[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 --- 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 --- a/drivers/tty/isicom.c +++ b/d

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

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

[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 --- 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/bdisp-hw.c index 4b62ceb..7b45

[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

[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] 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/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

[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

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
On 2017/12/13 13:18, Stephen Hemminger wrote: On Tue, 12 Dec 2017 20:57:01 -0500 (EST) David Miller wrote: From: Stephen Hemminger Date: Tue, 12 Dec 2017 10:22:40 -0800 On Tue, 12 Dec 2017 08:34:45 -0500 (EST) David Miller wrote: From: Jia-Ju Bai Date: Tue, 12 Dec 2017 16:38:12

[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] qedi: Fix a possible sleep-in-atomic bug in qedi_process_tmf_resp

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

[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 --- 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/bluetooth/bluecard_cs.c ++

[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 --- 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..6addcbd 100644 --- a/drivers/

[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 --- 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/ethernet/hp/hp100.c index c8c7

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

2017-12-13 Thread Jia-Ju Bai
-by: Jia-Ju Bai --- 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/qla3xxx.c +++ b/drivers/

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

2017-12-13 Thread Jia-Ju Bai
bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai --- 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

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

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

[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

[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 --- 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/ethernet/cadence/macb_mai

[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 --- 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/rtc-r7301.c @@ -95,7 +95,7 @@ static

[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

[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 --- 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/drm_mm.c +++ b/drivers/gpu/

[PATCH] [PATCH] qla4xxx: Fix a sleep-in-atomic bug

2017-05-30 Thread 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

[PATCH] isdn: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
may sleep To fixed it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai --- drivers/isdn/i4l/isdn_ppp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index d07dd519..8aa15

[PATCH] i40e: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
it, the spin lock is released before "i40e_vsi_remove_pvid", and the lock is acquired again after this function. Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethern

[PATCH] enic: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
p To fix it, the "spin_lock" and "spin_unlock" are removed in enic_reset. Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/cisco/enic/enic_main.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet

[PATCH] enic: Fix another sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
To fix it, the "spin_lock" and "spin_unlock" are removed in enic_tx_hang_reset. Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/cisco/enic/enic_main.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/et

[PATCH] megaraid: Fix a sleep-in-atomic bug

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

[PATCH] gadget: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: ffs_epfile_io (acquire the lock by spin_lock_irq) usb_ep_alloc_request(GFP_KERNEL) --> may sleep To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai --- drivers/usb

[PATCH] iscsi: Fix a sleep-in-atomic bug

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

[PATCH V2] qla4xxx: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
;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

[PATCH] mISDN: Fix a sleep-in-atomic bug

2017-05-31 Thread Jia-Ju Bai
The driver may sleep under a read spin lock, and the function call path is: send_socklist (acquire the lock by read_lock) skb_copy(GFP_KERNEL) --> may sleep To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai --- drivers/isdn/mISDN/st

[PATCH] bcache: Fix a sleep-in-atomic bug

2017-05-31 Thread Jia-Ju Bai
d-off-by: Jia-Ju Bai --- drivers/md/bcache/journal.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 1198e53..ad47c36 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -724,6 +724,7 @@ static struct

[PATCH] libcfs: Fix a sleep-in-atomic bug in cfs_wi_exit

2017-05-31 Thread Jia-Ju Bai
lock. Signed-off-by: Jia-Ju Bai --- drivers/staging/lustre/lnet/libcfs/workitem.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index dbc2a9b..cef25c8 100644

[PATCH] libcfs: Fix a sleep-in-atomic bug in cfs_wi_deschedule

2017-05-31 Thread Jia-Ju Bai
d spin_unlock. Signed-off-by: Jia-Ju Bai --- drivers/staging/lustre/lnet/libcfs/workitem.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index dbc2a9b..7e25eb9 100644

[PATCH] libcfs: Fix a sleep-in-atomic bug in cfs_wi_schedule

2017-05-31 Thread Jia-Ju Bai
d spin_unlock. Signed-off-by: Jia-Ju Bai --- drivers/staging/lustre/lnet/libcfs/workitem.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index dbc2a9b..30d28cd 100644 --- a/dr

[PATCH V2] libcfs: Fix a sleep-in-atomic bug in cfs_wi_deschedule

2017-05-31 Thread Jia-Ju Bai
d spin_unlock. Signed-off-by: Jia-Ju Bai --- drivers/staging/lustre/lnet/libcfs/workitem.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index dbc2a9b..9c530cf 100644

[PATCH V2] libcfs: Fix a sleep-in-atomic bug in cfs_wi_exit

2017-05-31 Thread Jia-Ju Bai
lock. Signed-off-by: Jia-Ju Bai --- drivers/staging/lustre/lnet/libcfs/workitem.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index dbc2a9b..928d06d 100644

[PATCH] libcfs: Fix a sleep-in-atomic bug in cfs_wi_sched_destroy

2017-05-31 Thread Jia-Ju Bai
d spin_unlock. Signed-off-by: Jia-Ju Bai --- drivers/staging/lustre/lnet/libcfs/workitem.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index dbc2a9b..e0424f6 100644 --- a/dr

[PATCH] libcfs: Fix a sleep-in-atomic bug in cfs_wi_scheduler

2017-05-31 Thread Jia-Ju Bai
d spin_unlock. Signed-off-by: Jia-Ju Bai --- drivers/staging/lustre/lnet/libcfs/workitem.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index dbc2a9b..9f7832e 100644

[PATCH] libcfs: Fix a sleep-in-atomic bug in cfs_percpt_lock and cfs_percpt_unlock

2017-05-31 Thread Jia-Ju Bai
the spin_lock and spin_unlock. Signed-off-by: Jia-Ju Bai --- drivers/staging/lustre/lnet/libcfs/libcfs_lock.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c b/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c i

Re: [PATCH] bcache: Fix a sleep-in-atomic bug

2017-05-31 Thread Jia-Ju Bai
On 05/31/2017 03:23 PM, Jia-Ju Bai wrote: The driver may sleep under a spin lock, and the function call path is: journal_wait_for_write (acquire the lock by spin_lock) closure_sync schedule --> may sleep To fix it, the lock is released before "closure_sync", and the loc

[PATCH] gma500: Fix a sleep-in-atomic bug in psbfb_2d_submit

2017-05-31 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: psbfb_2d_submit (acquire the lock by spin_lock_irqsave) psb_2d_wait_available psb_spank msleep --> may sleep To fix it, the "msleep" is replaced with "mdelay" in psb_spank. Signed-off-by: J

[PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_hw_read_wx_2M and netxen_nic_hw_write_wx_2M

2017-05-31 Thread Jia-Ju Bai
ock netxen_pcie_sem_lock msleep --> may sleep To fix it, the "msleep" is replaced with "mdelay" in netxen_pcie_sem_lock. Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-05-31 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock) ioremap --> may sleep To fix it, the lock is released before "ioremap", and the lock is acquired again after this function. Signed-off-b

[PATCH] b43legacy: Fix a sleep-in-atomic bug in b43legacy_op_bss_info_changed

2017-05-31 Thread Jia-Ju Bai
red again after this function. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/broadcom/b43legacy/main.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c index f1e3dad..31ead21 100644 --

[PATCH] b43legacy: Fix a sleep-in-atomic bug in b43legacy_attr_interfmode_store

2017-05-31 Thread Jia-Ju Bai
b43legacy_synth_pu_workaround might_sleep and msleep --> may sleep Fixing it may be complex, and a possible way is to remove spin_lock_irqsave and spin_lock_irqrestore in b43legacy_attr_interfmode_store, and the code has been protected by mutex_lock and mutex_unlock. Signed-off-by: Jia-Ju

[PATCH] qed: Fix a sleep-in-interrupt bug in qed_int_sp_dpc

2017-05-31 Thread Jia-Ju Bai
qed_ptt_acquire usleep_range --> may sleep To fix it, the "usleep_range" is replaced with "udelay". Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/qlogic/qed/qed_hw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] b43legacy: Fix a sleep-in-atomic bug in b43legacy_attr_interfmode_store

2017-05-31 Thread Jia-Ju Bai
On 06/01/2017 01:33 AM, Larry Finger wrote: On 05/31/2017 05:29 AM, Jia-Ju Bai wrote: The driver may sleep under a spin lock, and the function call path is: b43legacy_attr_interfmode_store (acquire the lock by spin_lock_irqsave) b43legacy_radio_set_interference_mitigation

Re: [PATCH] b43legacy: Fix a sleep-in-atomic bug in b43legacy_op_bss_info_changed

2017-05-31 Thread Jia-Ju Bai
On 06/01/2017 08:07 AM, Larry Finger wrote: On 05/31/2017 10:32 AM, Michael Büsch wrote: On Wed, 31 May 2017 13:26:43 +0300 Kalle Valo wrote: Jia-Ju Bai writes: The driver may sleep under a spin lock, and the function call path is: b43legacy_op_bss_info_changed (acquire the lock by

[PATCH] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-05-31 Thread Jia-Ju Bai
-by: Jia-Ju Bai --- drivers/infiniband/sw/rxe/rxe_verbs.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index 83d709e..6fb7e1a 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c ++

[PATCH] i40iw: Add a value assignment to avoid sleep-in-atomic bug caused by uninitialized value

2017-05-31 Thread Jia-Ju Bai
w_process_aeq i40iw_next_iw_state i40iw_hw_modify_qp (call i40iw_get_cqp_request) i40iw_handle_cqp_op i40iw_wait_event --> may sleep To fix it, "cqp_request->waiting" is assigned in "else" branch in i40iw_get_cqp_request. Signed-off-by: Jia-J

[PATCH] cw1200: Fix a sleep-in-atomic bug in cw1200_tx_confirm_cb and cw1200_cqm_bssloss_sm

2017-05-31 Thread Jia-Ju Bai
ock is released before cancel_work_sync, and the lock is acquired again after this function. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/st/cw1200/sta.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/st/cw1200/sta.c b/drivers/net/wireless/st/cw1200/sta.c index a

[PATCH] cx18: Fix a sleep-in-atomic bug in snd_cx18_pcm_hw_free

2017-05-31 Thread Jia-Ju Bai
memory is freed by vfree through the temporary value outside the lock holding. Signed-off-by: Jia-Ju Bai --- drivers/media/pci/cx18/cx18-alsa-pcm.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/cx18/cx18-alsa-pcm.c b/drivers/media/pci/cx18/cx18-alsa-

[PATCH] ivtv: Fix a sleep-in-atomic bug in snd_ivtv_pcm_hw_free

2017-05-31 Thread Jia-Ju Bai
memory is freed by vfree through the temporary value outside the lock holding. Signed-off-by: Jia-Ju Bai --- drivers/media/pci/ivtv/ivtv-alsa-pcm.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c b/drivers/media/pci/ivtv/ivtv-alsa-

Re: [PATCH] megaraid: Fix a sleep-in-atomic bug

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

[PATCH] rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss

2017-05-31 Thread Jia-Ju Bai
sd_ddr_pre_tuning_tx sd_change_phase wait_timeout schedule_timeout --> may sleep To fix it, "wait_timeout" is replaced with mdelay in sd_change_phase. Signed-off-by: Jia-Ju Bai --- drivers/staging/rts5208/sd.c |2 +- 1 file changed, 1 in

[PATCH] rts5208: Fix a sleep-in-atomic bug in sd_power_off_card3v3

2017-05-31 Thread Jia-Ju Bai
; is replaced with mdelay in sd_power_off_card3v3. Signed-off-by: Jia-Ju Bai --- drivers/staging/rts5208/sd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c index bdd35b6..aa14454 100644 --- a/drivers/staging/rts52

[PATCH V2] ivtv: Fix a sleep-in-atomic bug in snd_ivtv_pcm_hw_free

2017-06-01 Thread Jia-Ju Bai
memory is freed by vfree through the temporary value outside the lock holding. Signed-off-by: Jia-Ju Bai --- drivers/media/pci/ivtv/ivtv-alsa-pcm.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c b/drivers/media/pci/ivtv/ivtv-alsa-

[PATCH] cx18: Fix a sleep-in-atomic bug in snd_cx18_pcm_hw_free

2017-06-01 Thread Jia-Ju Bai
memory is freed by vfree through the temporary value outside the lock holding. Signed-off-by: Jia-Ju Bai --- drivers/media/pci/cx18/cx18-alsa-pcm.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/cx18/cx18-alsa-pcm.c b/drivers/media/pci/cx18/cx18-alsa-

[PATCH V2] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-01 Thread Jia-Ju Bai
ter "flags" is used to restore and save the irq status. Thank Leon for good advice. Signed-off-by: Jia-Ju Bai --- drivers/infiniband/sw/rxe/rxe_verbs.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infi

[PATCH] qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M

2017-06-01 Thread Jia-Ju Bai
qlcnic_pcie_sem_lock usleep_range To fix it, the usleep_range is replaced with udelay. Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net

[PATCH V3] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-01 Thread Jia-Ju Bai
ter "flags" is used to restore and save the irq status. Thank Leon for good advice. This patch corrects the mistakes in V2. (Thank Ram for pointing it out) Signed-off-by: Jia-Ju Bai --- drivers/infiniband/sw/rxe/rxe_verbs.c | 13 - 1 file changed, 8 insertions(+), 5 delet

[BUG] ntb: Sleep in interrupt handling

2017-06-01 Thread Jia-Ju Bai
my static analysis tool and my code review. I hope to fix it, but I do not have a good solution. Thanks, Jia-Ju Bai

[PATCH] oss: Fix a sleep-in-atomic bug in midi_outc

2017-06-01 Thread Jia-Ju Bai
ion. Signed-off-by: Jia-Ju Bai --- sound/oss/sequencer.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c index f19da4b..3d95d752 100644 --- a/sound/oss/sequencer.c +++ b/sound/oss/sequencer.c @@ -1211,7 +1211,9 @@ static void midi_outc(int dev, unsig

Re: [PATCH] iscsi: Fix a sleep-in-atomic bug

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

Re: [PATCH] b43legacy: Fix a sleep-in-atomic bug in b43legacy_attr_interfmode_store

2017-06-01 Thread Jia-Ju Bai
On 06/02/2017 12:11 AM, Jonathan Corbet wrote: On Thu, 01 Jun 2017 09:05:07 +0800 Jia-Ju Bai wrote: I admit my patches are not well tested, and they may not well fix the bugs. I am looking forward to opinions and suggestions :) May I politely suggest that sending out untested locking changes

[PATCH] net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx

2017-06-10 Thread Jia-Ju Bai
a rcu read lock, instead in interrupt. To fix it, only "GFP_ATOMIC" is used in cfpkt_create_pfx. Signed-off-by: Jia-Ju Bai --- net/caif/cfpkt_skbuff.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c index 59c

[PATCH] net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse

2017-06-10 Thread Jia-Ju Bai
skb tipc_node_xmit tipc_sk_rcv tipc_msg_reverse pskb_expand_head(GFP_KERNEL) --> may sleep To fix it, "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai --- net/tipc/msg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH] rts5208: Fix a sleep-in-atomic bug in sd_send_cmd_get_rsp

2017-06-13 Thread Jia-Ju Bai
sd_ddr_pre_tuning_tx sd_send_cmd_get_rsp wait_timeout schedule_timeout --> may sleep To fix it, "wait_timeout" is replaced with mdelay in sd_send_cmd_get_rsp. Signed-off-by: Jia-Ju Bai --- drivers/staging/rts5208/sd.c |2 +- 1 file changed

[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 --- 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 --- a/drivers/block/drbd/drbd_nl.c ++

[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 --- 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/drivers/block/drbd/drbd_nl.c ++

[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

[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] scsi/fnic: Fix a sleep-in-atomic bug in fnic_handle_event

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

[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

[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

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 is

[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 --- 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(substring_t *s, int *result,

[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

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

2017-10-06 Thread Jia-Ju Bai
Thanks for your reply. I agree that extra allocation in match_number() and match_u64int() may be unnecessary. Thanks, Jia-Ju Bai On 2017/10/7 9:37, Linus Torvalds wrote: On Fri, Oct 6, 2017 at 6:20 PM, Jia-Ju Bai wrote: To fix it, GFP_KERNEL is replaced with GFP_ATOMIC. This bug is found

<    2   3   4   5   6   7   8   >