On 2018/4/11 16:17, Greg KH wrote:
On Wed, Apr 11, 2018 at 04:11:00PM +0800, Jia-Ju Bai wrote:
On 2018/4/11 16:03, Greg KH wrote:
On Wed, Apr 11, 2018 at 03:17:10PM +0800, Jia-Ju Bai wrote:
On 2018/4/11 14:41, Greg KH wrote:
On Wed, Apr 11, 2018 at 09:29:34AM +0800, Jia-Ju Bai wrote
sy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/dr
On 2018/4/11 22:26, David Miller wrote:
From: Jia-Ju Bai <baijiaju1...@gmail.com>
Date: Wed, 11 Apr 2018 16:20:22 +0800
Okay, I now know why many of my patches were not replied.
Many of your patches are not responded to because you handle patch
feedback poorly sometimes.
Okay,
er getting called from atomic context, sxgbe_sw_reset()
calls mdelay() to busily wait.
This is not necessary and can be replaced with usleep_range() to
avoid busy waiting.
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
e replaced with usleep_range() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
---
v2:
* Use usleep_range() to correct usleep() in v1.
---
drivers/net/et
c analysis tool named DCNS written by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
drivers/video/fbdev/savage/savagefb_driver.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/savage/savagefb
Jia-Ju Bai <baijiaju1...@gmail.com>
---
v2:
* Modify the description of GFP_ATOMIC in v1.
Thank Eric for good advice.
---
net/decnet/dn_route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 0bd3afd..59ed12a 100644
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 <baijiaju1...@gmail.com>
---
v2:
* Modify the description of GFP_ATOMIC in v1.
also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
v2:
* Modify the description of GFP_ATOMIC in v1.
Thank Eric for good advice.
---
net/ncsi/ncsi-manage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/n
s tool named DCNS written by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
v2:
* Modify the description of GFP_ATOMIC in v1.
Thank Eric for good advice.
---
net/tipc/monitor.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --gi
s tool named DCNS written by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
v2:
* Modify the description of GFP_ATOMIC in v1.
Thank Eric for good advice.
---
net/tipc/monitor.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --gi
Jia-Ju Bai <baijiaju1...@gmail.com>
---
v2:
* Modify the description of GFP_ATOMIC in v1.
Thank Eric for good advice.
---
net/decnet/dn_route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 0bd3afd..59ed12a 100644
msleep() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/usb/storage/freecom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/
context, aty128_set_suspend()
calls mdelay() to busily wait.
This is not necessary and can be replaced with msleep() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
--
usily wait.
This is not necessary and can be replaced with msleep()
and usleep_range() to avoid busy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/video/fbdev/aty/radeon_pm.c | 8
On 2018/4/9 22:44, Eric Dumazet wrote:
On 04/09/2018 07:10 AM, Jia-Ju Bai wrote:
dn_route_init() is never called in atomic context.
The call chain ending up at dn_route_init() is:
[1] dn_route_init() <- decnet_init()
decnet_init() is only set as a parameter of module_init().
Despite ne
replaced with msleep() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/usb/isp1760/isp1760-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
ly check it
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
drivers/usb/isp1760/isp1760-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/isp1760/isp1760-hcd.c
b/drivers/usb/isp1760/isp1760-hcd.c
index 8e59e0c..5599310 100644
--- a/drivers/usb/isp1760/is
with GFP_KERNEL,
to avoid busy waiting 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 <baijiaju1...@gmail.com>
---
fs/quota/dquot.c | 2 +-
1 file changed, 1 ins
ity 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 <baijiaju1...@gmail.com>
---
fs/dlm/lowcomms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/l
o disable
the interrupt;
perf_pmu_register() calls mutex_lock() and idr_alloc(GFP_KERNEL), and
they can sleep;
pmu_dev_alloc() calls kzalloc(GFP_KERNEL), and it can sleep.
In my opinion, this code may sleep with interrupts are disabled.
I wonder why this code is okay?
Best wishes,
Jia-Ju Bai
location.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/soc/intel/boards/byt
MIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/soc/intel/boards/bxt_rt298.c
MIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/soc/intel/boards/bxt_da7219_
MIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/soc/intel/boards/skl_nau8
MIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/soc/intel/boards/cht_bsw_rt5645.c
MIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/soc/intel/boards/cht_bsw_ma
MIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/soc/intel/boards/skl_rt286.c
MIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/soc/intel/boards/skl_nau88l2
with GFP_KERNEL,
to avoid busy waiting 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 <baijiaju1...@gmail.com>
---
net/dccp/proto.c | 4 ++--
1 file chan
off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
net/decnet/dn_route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 0bd3afd..59ed12a 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1898,7 +1898,7 @@ vo
s tool named DCNS written by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
net/tipc/monitor.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/tipc/monitor.c b/net/tipc/monitor.c
index 9e109bb..9714d80 100644
--
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
net/ncsi/ncsi-manage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 3fd3c39..6b5b5a0 100644
--- a/net/ncsi/ncsi-manage.c
++
.
Despite never getting called from atomic context, snd_ad1889_init()
calls mdelay for busy wait.
This is not necessary and can be replaced with usleep_range to
avoid busy waiting.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gm
S written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/pci/ad1889.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 0bf2c04..a2a8e1d 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@
On 2018/4/13 18:41, Mark Brown wrote:
On Mon, Apr 09, 2018 at 06:46:21PM +0800, Jia-Ju Bai wrote:
broxton_audio_probe() is never called in atomic context.
This function is only set as ".probe" in "struct platform_driver".
Please submit patches using subject lines
On 2018/4/11 23:04, Ulf Hansson wrote:
On 11 April 2018 at 04:46, Jia-Ju Bai <baijiaju1...@gmail.com> wrote:
wbsd_init() is never called in atomic context.
The call chains ending up at wbsd_init() are:
[1] wbsd_init() <- wbsd_probe()
[2] wbsd_init() <- wbsd_pnp_probe()
wbsd_pr
On 2018/4/12 0:19, Florian Fainelli wrote:
On 04/11/2018 12:14 AM, Jia-Ju Bai wrote:
On 2018/4/11 13:30, Phil Reid wrote:
On 11/04/2018 09:51, Jia-Ju Bai wrote:
b53_switch_reset_gpio() is never called in atomic context.
The call chain ending up at b53_switch_reset_gpio() is:
[1
On 2018/4/12 0:16, James Bottomley wrote:
On Wed, 2018-04-11 at 23:39 +0800, Jia-Ju Bai wrote:
de4x5_hw_init() is never called in atomic context.
de4x5_hw_init() is only called by de4x5_pci_probe(), which is only
set as ".probe" in struct pci_driver.
Despite never getting called f
sis tool named DCNS written by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
v2:
* Use gpio_set_value_cansleep() to replace gpio_set_value() additionally.
Thanks for Florian and Phil for good advice.
---
drivers/net/dsa/b53/b53_common.c | 8 ++
On 2018/4/12 10:21, arvindY wrote:
On Thursday 12 April 2018 07:00 AM, Jia-Ju Bai wrote:
On 2018/4/12 0:16, James Bottomley wrote:
On Wed, 2018-04-11 at 23:39 +0800, Jia-Ju Bai wrote:
de4x5_hw_init() is never called in atomic context.
de4x5_hw_init() is only called by de4x5_pci_probe
sy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/staging/irda/drivers/irda-usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/stag
sy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/net/can/sja1000/peak_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/sja10
sy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/mmc/host/wbsd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/wbsd.c b/drivers
leep_range() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/mmc/host/wbsd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/
e 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 <baijiaju1...@gmail.com>
---
drivers/misc/ti-st/st_kim.c | 2 +-
1
loc_coherent() with GFP_ATOMIC,
which does not sleep for 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
urb() with GFP_ATOMIC,
which does not sleep for 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
urb() with GFP_ATOMIC,
which does not sleep for 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
lled from atomic context, fcpci_init()
calls mdelay() to busily wait.
This is not necessary and can be replaced with usleep_range() to
avoid busy waiting.
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 <baijiaju1...@gmai
tomic context, fcpcipnp_setup()
calls mdelay() to busily wait.
This is not necessary and can be replaced with usleep_range() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
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 <baijiaju1...@gmail.com>
---
drivers/x
ry and can be replaced with usleep_range() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/net/can/sja1000/peak_pcmcia.c | 2 +-
1 file changed, 1 insertio
myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
drivers/net/dsa/b53/b53_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 274f367..e070ff6 100
e replaced with usleep_range() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/net/ethernet/dec/tulip/de4x5.c | 2 +-
1 file changed, 1 insertio
ten by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
b/drivers/net/ethernet/intel/
er getting called from atomic context, sxgbe_sw_reset()
calls mdelay() to busily wait.
This is not necessary and can be replaced with usleep_range() to
avoid busy waiting.
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
which does not sleep for 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
.
This is not necessary and can be replaced with usleep_range() to
avoid busy waiting.
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 <baijiaju1...@gmail.com>
---
drivers/mtd/nand/diskonchip.c | 4 ++--
1 file changed, 2 inse
On 2018/4/10 23:01, Boris Ostrovsky wrote:
On 04/10/2018 10:31 AM, Jia-Ju Bai wrote:
On 2018/4/10 22:27, Boris Ostrovsky wrote:
On 04/09/2018 11:03 AM, Jia-Ju Bai wrote:
pcistub_probe() is never called in atomic context.
This function is only set as ".probe" in struct pci_driver
gned-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
drivers/staging/irda/drivers/irda-usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/irda/drivers/irda-usb.c
b/drivers/staging/irda/drivers/irda-usb.c
index 723e49b..c6c8c2c 100644
--- a/drivers/sta
e 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 <baijiaju1...@gmail.com>
---
drivers/net/ieee802154/atusb.c | 2 +-
1
tten by myself.
And I also manually check it.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
drivers/mmc/host/wbsd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index 546aaf8..6224d12 100644
--- a/drivers/mmc/host/wbsd
ce_init_td0_ring(priv);
+ if (ret)
+ goto err_init_td0_ring;
+ ret = device_init_td1_ring(priv);
+ if (ret)
+ goto err_init_td1_ring;
device_init_registers(priv);
@@ -1178,6 +1226,15 @@ static int vnt_start(struct ieee80211_hw *hw)
ieee80211_wake_queues(hw);
return 0;
+
+err_init_td1_ring:
+ device_free_td0_ring(priv);
+err_init_td0_ring:
+ device_free_rd1_ring(priv);
+err_init_rd1_ring:
+ device_free_rd0_ring(priv);
+err_init_rd0_ring:
+ return ret;
}
static void vnt_stop(struct ieee80211_hw *hw)
It looks okay now :)
Best wishes,
Jia-Ju Bai
_ring() is called by vnt_start().
You should also implement error handling code in vnt_start(), and let
vnt_start() returns an error number too.
The same for device_init_rd1_ring(), device_init_td0_ring() and
device_init_td1_ring().
Best wishes,
Jia-Ju Bai
ee_rd1_ring(priv);
error_init_rd1_ring:
device_free_rd0_ring(priv);
error_init_rd0_ring:
return ret;
Best wishes,
Jia-Ju Bai
On 2018/3/30 11:39, Ji-Hun Kim wrote:
On Fri, Mar 30, 2018 at 11:15:03AM +0800, Jia-Ju Bai wrote:
On 2018/3/30 10:44, Ji-Hun Kim wrote:
@@ -1165,10 +1205,18 @@ static int vnt_start(struct ieee80211_hw *hw)
}
dev_dbg(>pcid->dev, "call device init
o return directly.
I think you should return an error and then implement error handling
code for these functions.
Best wishes,
Jia-Ju Bai
getting called from atomic context, line6_write_data()
calls mdelay for busy wait.
That is not necessary and can be replaced with msleep to
avoid busy waiting.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/usb
t.
Despite never getting called from atomic context,
line6_alloc_sysex_buffer() calls kmalloc with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL
to avoid busy waiting.
This is found by a static analysis tool named DCNS written b
.
That is not necessary and can be replaced with msleep to
avoid busy waiting.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
sound/usb/line6/driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
cpt_device_init() calls
mdelay(100), i.e. busy wait for 100ms.
That is not necessary and can be replaced with msleep to
avoid busy waiting.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
drivers/crypto/cavium/cp
ations structure "cm4000_fops".
Despite never getting called from atomic context, set_protocol() calls
mdelay(10), i.e. busy wait for 10ms.
That is not necessary and can be replaced with usleep_range to
avoid busy waiting.
This is found by a static analysis tool named DCNS written by myse
ice() calls kzalloc with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL
to avoid busy waiting.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com>
---
drivers/pci
led from atomic context,
hv_pci_onchannelcallback() calls kmalloc with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL
to avoid busy waiting.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by
On 2018/3/19 10:52, KY Srinivasan wrote:
-Original Message-
From: Jia-Ju Bai <baijiaju1...@gmail.com>
Sent: Sunday, March 18, 2018 7:53 AM
To: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang
<haiya...@microsoft.com>; Stephen Hemminger
<sthem...@microsoft.com&
On 2018/3/19 16:38, Dan Carpenter wrote:
On Sun, Mar 18, 2018 at 10:53:02PM +0800, Jia-Ju Bai wrote:
hv_pci_onchannelcallback() is not called in atomic context.
The call chain ending up at hv_pci_onchannelcallback() is:
[1] hv_pci_onchannelcallback() <- hv_pci_probe()
hv_pci_probe() is o
) and checked by
my code review.
Signed-off-by: Jia-Ju Bai
---
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index b26533983864
static analysis tool (DSAC-2) and checked by
my code review.
Signed-off-by: Jia-Ju Bai
---
drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c
b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index
On 2018/6/20 17:56, Dan Carpenter wrote:
On Wed, Jun 20, 2018 at 05:50:16PM +0800, Jia-Ju Bai wrote:
The driver may sleep with holding a spinlock.
The function call paths (from bottom to top) in Linux-4.16.7 are:
[FUNC] kzalloc(GFP_KERNEL)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c, 323
(), the bug fix is to remove the
calls to spin-lock and -unlock functions in coh901318_config().
Signed-off-by: Jia-Ju Bai
---
drivers/dma/coh901318.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c
index eebaba3d9e78..fd862a478738 100644
operation in CPU0 is performed
with holding a spinlock, but the READ operation in CPU1 is performed
without holding this spinlock, so there may exist a data race.
Best wishes,
Jia-Ju Bai
On 2018/10/9 17:07, Lee Jones wrote:
On Mon, 17 Sep 2018, Jia-Ju Bai wrote:
On 2018/9/17 9:03, Lee Jones wrote:
On Sat, 15 Sep 2018, Jia-Ju Bai wrote:
The driver may sleep in an interrupt handler.
The function call paths (from bottom to top) in Linux-4.17 are:
[FUNC] mutex_lock_nested
On 2018/9/24 17:26, Jiri Kosina wrote:
On Thu, 13 Sep 2018, Jia-Ju Bai wrote:
hid_alloc_report_buf() has to be called with GFP_ATOMIC in
__hid_request(), because there are the following callchains
leading to __hid_request() being an atomic context:
picolcd_send_and_wait (acquire a spinlock
On 2018/10/4 13:24, Takashi Iwai wrote:
On Thu, 04 Oct 2018 05:08:45 +0200,
Jia-Ju Bai wrote:
Thanks for the reply :)
On 2018/10/3 23:54, Takashi Iwai wrote:
On Wed, 03 Oct 2018 14:50:25 +0200,
Jia-Ju Bai wrote:
CPU0:
snd_trident_hw_free
snd_trident_free_voice
line
Thanks for the reply :)
On 2018/10/3 23:54, Takashi Iwai wrote:
On Wed, 03 Oct 2018 14:50:25 +0200,
Jia-Ju Bai wrote:
CPU0:
snd_trident_hw_free
snd_trident_free_voice
line 3870: spin_lock_irqsave()
line 3881: voice->substream = NULL; [WRITE]
C
On 2018/9/30 3:20, Jiri Kosina wrote:
On Sat, 29 Sep 2018, Jia-Ju Bai wrote:
picolcd_send_and_wait (acquire a spinlock)
hid_hw_request
__hid_request
hid_alloc_report_buf(GFP_KERNEL)
picolcd_reset (acquire a spinlock)
hid_hw_request
__hid_request
On 2018/9/3 4:32, Jason Gunthorpe wrote:
On Sat, Sep 01, 2018 at 08:06:59PM +0800, Jia-Ju Bai wrote:
The driver may sleep with holding a spinlock.
The function call paths (from bottom to top) in Linux-4.16 are:
[FUNC] alloc_mad_private(GFP_KERNEL)
drivers/infiniband/core/mad.c, 2264
Thanks for the reply :)
On 2018/9/11 1:41, Mark Brown wrote:
On Thu, Aug 30, 2018 at 10:34:20AM +0800, Jia-Ju Bai wrote:
My static tool DSAC reports many sleep-in-atomic-context bugs involving
regmap_lock_mutex(), so I wonder whether this function is possible to be
executed in atomic context
hid_alloc_report_buf(GFP_KERNEL)
This bug is found by my static analysis tool DSAC.
Signed-off-by: Jia-Ju Bai
---
v2:
* Make the description more human readable.
Thanks Jiri for good advice.
---
drivers/hid/hid-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
:
rtw_set_802_11_infrastructure_mode in rtw_wx_set_wap
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c, 988:
spin_lock_bh in rtw_wx_set_wap
To fix this bug, msleep() is replaced with mdelay().
This bug is found by my static analysis tool DSAC.
Signed-off-by: Jia-Ju Bai
---
drivers/staging/rtl8188eu/core
] mutex_lock_nested
drivers/mfd/ezx-pcap.c, 244:
mutex_lock_nested in pcap_adc_trigger
drivers/mfd/ezx-pcap.c, 299:
pcap_adc_trigger in pcap_adc_irq (interrupt handler)
These bugs are found by my static analysis tool DSAC.
Best wishes,
Jia-Ju Bai
().
This bug is found by my static analysis tool DSAC.
Signed-off-by: Jia-Ju Bai
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index
:
_rtw_pwr_wakeup in rtw_set_802_11_disassociate
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 501:
spin_lock_bh in rtw_set_802_11_disassociate
To fix these bugs, msleep() is replaced with mdelay().
These bugs are found by my static analysis tool DSAC.
Signed-off-by: Jia-Ju Bai
---
drivers
On 2018/9/17 9:03, Lee Jones wrote:
On Sat, 15 Sep 2018, Jia-Ju Bai wrote:
The driver may sleep in an interrupt handler.
The function call paths (from bottom to top) in Linux-4.17 are:
[FUNC] mutex_lock_nested
drivers/mfd/ezx-pcap.c, 272:
mutex_lock_nested in pcap_adc_irq (interrupt
return;
desc->td_info->buf = priv->tx1_bufs + i * PKT_BUF_SZ;
desc->td_info->buf_dma = priv->tx_bufs_dma1 + i * PKT_BUF_SZ;
I think the bugs you found are right.
But your patch is not correct, because it is dangerous to return directly.
I think you should return an error and then implement error handling
code for these functions.
Best wishes,
Jia-Ju Bai
).
You should also implement error handling code in vnt_start(), and let
vnt_start() returns an error number too.
The same for device_init_rd1_ring(), device_init_td0_ring() and
device_init_td1_ring().
Best wishes,
Jia-Ju Bai
ee_rd1_ring(priv);
error_init_rd1_ring:
device_free_rd0_ring(priv);
error_init_rd0_ring:
return ret;
Best wishes,
Jia-Ju Bai
On 2018/3/30 11:39, Ji-Hun Kim wrote:
On Fri, Mar 30, 2018 at 11:15:03AM +0800, Jia-Ju Bai wrote:
On 2018/3/30 10:44, Ji-Hun Kim wrote:
@@ -1165,10 +1205,18 @@ static int vnt_start(struct ieee80211_hw *hw)
}
dev_dbg(>pcid->dev, "call device init
operations to "dev->stats" are
protected by the spinlock, and a local variable is used for return.
Signed-off-by: Jia-Ju Bai
---
drivers/net/ethernet/8390/lib8390.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/8390/lib8390.c
b/dr
401 - 500 of 1251 matches
Mail list logo