[PATCH v2 1/4 resend] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
rol is accessed on line 681: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- v2: * Use "rtlwifi" as subject prefix and

[PATCH v2 2/4 resend] rtlwifi: rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
rol is accessed on line 534: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- v2: * Use "rtlwifi" as subject prefix and

[PATCH v2 4/4 resend] rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
rame_control is accessed on line 535: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- v2: * Use "rtlwifi" as subject prefix and

Re: [PATCH v2 1/4] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
Thanks for the advice. I have added the description of the changes and resent the patches. Best wishes, Jia-Ju Bai On 2020/11/19 1:20, Larry Finger wrote: On 11/17/20 7:53 PM, Jia-Ju Bai wrote: In rtl88ee_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 677:    dma_add

[PATCH v2 3/4 resend] rtlwifi: rtl8192de: avoid accessing the data mapped to streaming DMA

2020-11-18 Thread Jia-Ju Bai
rol is accessed on line 670: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- v2: * Use "rtlwifi" as subject prefix and

[PATCH v2 1/4] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
rol is accessed on line 681: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx

[PATCH v2 2/4] rtlwifi: rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
rol is accessed on line 534: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx

[PATCH v2 3/4] rtlwifi: rtl8192de: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
rol is accessed on line 670: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx

Re: [PATCH] rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
On 2020/11/7 19:44, Kalle Valo wrote: Jia-Ju Bai wrote: In rtl92ce_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 530: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 533, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr

[PATCH v2 4/4] rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
rame_control is accessed on line 535: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx

[PATCH] rtl8180: avoid accessing the data mapped to streaming DMA

2020-10-18 Thread Jia-Ju Bai
and 541: hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); hdr->seq_ctrl |= cpu_to_le16(priv->seqno); These DMA accesses may cause data inconsistency between CPU and hardwre. To fix this problem, hdr->seq_ctrl is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --

[PATCH] rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-10-18 Thread Jia-Ju Bai
rol is accessed on line 534: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx

[PATCH] rtl8192de: avoid accessing the data mapped to streaming DMA

2020-10-18 Thread Jia-Ju Bai
rol is accessed on line 670: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx

[PATCH] rtl8723ae: avoid accessing the data mapped to streaming DMA

2020-10-18 Thread Jia-Ju Bai
rame_control is accessed on line 535: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx

[PATCH] rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-10-18 Thread Jia-Ju Bai
rol is accessed on line 681: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx

[PATCH] net: mellanox: mlx5: fix error return code in mlx5_fpga_device_start()

2021-03-04 Thread Jia-Ju Bai
When mlx5_is_fpga_lookaside() returns a non-zero value, no error return code is assigned. To fix this bug, err is assigned with -EINVAL as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 4 +++- 1 file changed, 3

[PATCH] net: tehuti: fix error return code in bdx_probe()

2021-03-04 Thread Jia-Ju Bai
When bdx_read_mac() fails, no error return code of bdx_probe() is assigned. To fix this bug, err is assigned with -EFAULT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/tehuti/tehuti.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH] net: intel: iavf: fix error return code of iavf_init_get_resources()

2021-03-04 Thread Jia-Ju Bai
When iavf_process_config() fails, no error return code of iavf_init_get_resources() is assigned. To fix this bug, err is assigned with the return value of iavf_process_config(), and then err is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/intel/iavf

[PATCH] marvell: libertas_tf: fix error return code of if_usb_prog_firmware()

2021-03-04 Thread Jia-Ju Bai
When check_fwfile_format() fails, no error return code of if_usb_prog_firmware() is assigned. To fix this bug, ret is assigned with -EINVAL as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/marvell/libertas_tf/if_usb.c | 4 +++- 1 file changed, 3

[PATCH] net: xdp: fix error return code of xsk_generic_xmit()

2021-03-05 Thread Jia-Ju Bai
Robot Signed-off-by: Jia-Ju Bai --- net/xdp/xsk.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 4faabd1ecfd1..f1c1db07dd07 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -484,8 +484,14 @@ static int xsk_generic_xmit(struct sock

[PATCH] net: smc: fix error return code of smc_diag_dump_proto()

2021-03-05 Thread Jia-Ju Bai
When the list of head is empty, no error return code of smc_diag_dump_proto() is assigned. To fix this bug, rc is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- net/smc/smc_diag.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH] net: mellanox: mlx5: fix error return code of mlx5e_stats_flower()

2021-03-06 Thread Jia-Ju Bai
When mlx5e_tc_get_counter() returns NULL to counter or mlx5_devcom_get_peer_data() returns NULL to peer_esw, no error return code of mlx5e_stats_flower() is assigned. To fix this bug, err is assigned with -EINVAL in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers

[PATCH] net: mellanox: mlxsw: fix error return code of mlxsw_sp_router_nve_promote_decap()

2021-03-06 Thread Jia-Ju Bai
When fib_entry is NULL, no error return code of mlxsw_sp_router_nve_promote_decap() is assigned. To fix this bug, err is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 +++- 1 file changed, 3

[PATCH] ti: wlcore: fix error return code of wl1271_suspend()

2021-03-06 Thread Jia-Ju Bai
When wl is NULL, no error return code of wl1271_suspend() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ti/wlcore/sdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net

[PATCH] ti: wlcore: fix error return code of wl1271_cmd_build_ps_poll()

2021-03-07 Thread Jia-Ju Bai
When ieee80211_pspoll_get() returns NULL to skb, no error return code of wl1271_cmd_build_ps_poll() is assigned. To fix this bug, ret is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ti/wlcore/cmd.c | 4 +++- 1 file changed, 3

[PATCH] rsi: fix error return code of rsi_load_9116_firmware()

2021-03-07 Thread Jia-Ju Bai
When kmemdup() returns NULL to ta_firmware, no error return code of rsi_load_9116_firmware() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/rsi/rsi_91x_hal.c | 4 +++- 1 file changed, 3

[PATCH] net: hisilicon: hns: fix error return code of hns_nic_clear_all_rx_fetch()

2021-03-07 Thread Jia-Ju Bai
When hns_assemble_skb() returns NULL to skb, no error return code of hns_nic_clear_all_rx_fetch() is assigned. To fix this bug, ret is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 4 +++- 1 file

[PATCH] ath: ath6kl: fix error return code of ath6kl_htc_rx_bundle()

2021-03-07 Thread Jia-Ju Bai
When hif_scatter_req_get() returns NULL to scat_req, no error return code of ath6kl_htc_rx_bundle() is assigned. To fix this bug, status is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ath/ath6kl/htc_mbox.c | 4 +++- 1 file

[PATCH] net: wan: fix error return code of uhdlc_init()

2021-03-07 Thread Jia-Ju Bai
When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of uhdlc_init() is assigned. To fix this bug, ret is assigned with -ENOMEM in these cases. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- drivers/net/wan/fsl_ucc_hdlc.c | 8 ++-- 1 file changed, 6 insertions

Re: [PATCH] ath: ath6kl: fix error return code of ath6kl_htc_rx_bundle()

2021-03-07 Thread Jia-Ju Bai
be false positives... Best wishes, Jia-Ju Bai On 2021/3/7 17:18, Leon Romanovsky wrote: On Sun, Mar 07, 2021 at 01:07:57AM -0800, Jia-Ju Bai wrote: When hif_scatter_req_get() returns NULL to scat_req, no error return code of ath6kl_htc_rx_bundle() is assigned. To fix this bug, status is

[PATCH] net: bonding: fix error return code of bond_neigh_init()

2021-03-07 Thread Jia-Ju Bai
When slave is NULL or slave_ops->ndo_neigh_setup is NULL, no error return code of bond_neigh_init() is assigned. To fix this bug, ret is assigned with -EINVAL in these cases. Fixes: 9e99bfefdbce ("bonding: fix bond_neigh_init()") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH] net: qrtr: fix error return code of qrtr_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of qrtr_sendmsg() is assigned. To fix this bug, rc is assigned with -ENOMEM in this case. Fixes: 194ccc88297a ("net: qrtr: Support decoding incoming v2 packets") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai ---

[PATCH] net: ieee802154: fix error return code of raw_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of raw_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: 78f821b64826 ("ieee802154: socket: put handling into one file") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

[PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: 78f821b64826 ("ieee802154: socket: put handling into one file") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

Re: [PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
On 2021/3/8 18:19, Heiner Kallweit wrote: On 08.03.2021 10:31, Jia-Ju Bai wrote: When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Please stop sending such nonsense. Basically all

Re: [PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
On 2021/3/8 21:33, Heiner Kallweit wrote: On 08.03.2021 13:18, Jia-Ju Bai wrote: On 2021/3/8 18:19, Heiner Kallweit wrote: On 08.03.2021 10:31, Jia-Ju Bai wrote: When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err is

[PATCH] net: bridge: fix error return code of do_update_counters()

2021-03-08 Thread Jia-Ju Bai
When find_table_lock() returns NULL to t, no error return code of do_update_counters() is assigned. To fix this bug, ret is assigned with -ENOENT in this case. Fixes: 49facff9f925 ("netfilter: ebtables: split update_counters into two functions") Reported-by: TOTE Robot Signed-off-by:

Re: [PATCH] net: mellanox: mlx5: fix error return code of mlx5e_stats_flower()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/9 16:24, Roi Dayan wrote: On 2021-03-09 10:20 AM, Roi Dayan wrote: On 2021-03-06 3:47 PM, Jia-Ju Bai wrote: When mlx5e_tc_get_counter() returns NULL to counter or mlx5_devcom_get_peer_data() returns NULL to peer_esw, no error return code of mlx5e_stats_flower() is assigned. To

[PATCH] net: netlink: fix error return code of netlink_proto_init()

2021-03-09 Thread Jia-Ju Bai
When kcalloc() returns NULL to nl_table, no error return code of netlink_proto_init() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: fab2caf62ed0 ("[NETLINK]: Call panic if nl_table allocation fails") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai

Re: [PATCH] net: netlink: fix error return code of netlink_proto_init()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/9 16:47, Heiner Kallweit wrote: On 09.03.2021 09:33, Jia-Ju Bai wrote: When kcalloc() returns NULL to nl_table, no error return code of netlink_proto_init() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Didn't we talk enough about your incorrect pa

Re: [PATCH] net: bridge: fix error return code of do_update_counters()

2021-03-09 Thread Jia-Ju Bai
On 2021/3/9 19:01, Florian Westphal wrote: Jia-Ju Bai wrote: When find_table_lock() returns NULL to t, no error return code of do_update_counters() is assigned. Its -ENOENT. t = find_table_lock(net, name, &ret, &ebt_mutex); ^

Re: [PATCH] net: bonding: fix error return code of bond_neigh_init()

2021-03-10 Thread Jia-Ju Bai
On 2021/3/10 17:24, Roi Dayan wrote: On 2021-03-08 5:11 AM, Jia-Ju Bai wrote: When slave is NULL or slave_ops->ndo_neigh_setup is NULL, no error return code of bond_neigh_init() is assigned. To fix this bug, ret is assigned with -EINVAL in these cases. Fixes: 9e99bfefdbce ("bond

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

2018-05-07 Thread Jia-Ju Bai
ations 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

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

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

2018-05-07 Thread Jia-Ju Bai
On 2018/5/8 9:56, Eric Dumazet wrote: On 05/07/2018 05:51 PM, Jia-Ju Bai wrote: 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

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

2018-05-07 Thread Jia-Ju Bai
On 2018/5/8 13:04, Eric Dumazet wrote: On 05/07/2018 07:16 PM, Jia-Ju Bai wrote: Yes, "&dev->stats" will not change, because it is a fixed address. But the field data in "dev->stats" is changed (rx_frame_errors, rx_crc_errors and rx_missed_errors). So if t

[PATCH] net: wireless: ath: ath9k: Fix a possible data race in ath_chanctx_set_next

2018-05-08 Thread Jia-Ju Bai
;sc->next_chan" should be also protected by the lock. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ath/ath9k/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 1b05b5d7a038

[PATCH] rtlwifi: Fix null-pointer dereferences in error handling code of rtl_pci_probe()

2019-05-14 Thread Jia-Ju Bai
eason of the above bug. To fix this bug, the initialization of lists in rtl_init_core() are performed before the call to rtl_regd_init(). These bugs are found by a runtime fuzzing tool named FIZZER written by us. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/realtek/rtlwifi/base.c | 15 +

[BUG] rtlwifi: Resource leaks in error handling code of rtl_pci_probe()

2019-05-14 Thread Jia-Ju Bai
report the bugs. These bugs are found by a runtime fuzzing tool named FIZZER written by us. Best wishes, Jia-Ju Bai

[BUG] rtlwifi: a crash in error handling code of rtl_pci_probe()

2019-05-14 Thread Jia-Ju Bai
somebody give an explanation about this crash? This crash is triggered by a runtime fuzzing tool named FIZZER written by us. Best wishes, Jia-Ju Bai

Re: [BUG] rtlwifi: a crash in error handling code of rtl_pci_probe()

2019-05-14 Thread Jia-Ju Bai
On 2019/5/15 9:08, Larry Finger wrote: On 5/14/19 8:07 AM, Jia-Ju Bai wrote: In rtl_pci_probe(), when request_irq() in rtl_pci_intr_mode_legacy() in rtl_pci_intr_mode_decide() fails, a crash occurs. The crash information is as follows: [ 108.271155] kasan: CONFIG_KASAN_INLINE enabled

[PATCH] wcn36xx: Remove unnecessary rcu_read_unlock in wcn36xx_bss_info_changed

2017-10-08 Thread Jia-Ju Bai
No rcu_read_lock is called, but rcu_read_unlock is still called. Thus rcu_read_unlock should be removed. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ath/wcn36xx/main.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless

[BUG] stmmac: A possible sleep-in-atomic bug in stmmac_suspend

2017-10-08 Thread Jia-Ju Bai
y code review. Thanks, Jia-Ju Bai

[PATCH] net: dccp: Replace GFP_ATOMIC with GFP_KERNEL in dccp_init

2018-04-09 Thread Jia-Ju Bai
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 --- net/dccp/proto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Jia-Ju Bai
-by: Jia-Ju Bai --- 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 @@ void __init dn_route_init(v

[PATCH] net: nsci: Replace GFP_ATOMIC with GFP_KERNEL in ncsi_register_dev

2018-04-09 Thread Jia-Ju Bai
And I also manually check it. Signed-off-by: Jia-Ju Bai --- 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 +++ b/net/ncsi/ncsi-manage.c @@ -1508

[PATCH] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-09 Thread Jia-Ju Bai
s tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- 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 --- a/net/tipc/monitor.c +++ b/ne

Re: [PATCH] net: dccp: Replace GFP_ATOMIC with GFP_KERNEL in dccp_init

2018-04-09 Thread Jia-Ju Bai
On 2018/4/9 22:42, Eric Dumazet wrote: On 04/09/2018 07:10 AM, Jia-Ju Bai wrote: dccp_init() is never called in atomic context. This function is only set as a parameter of module_init(). Despite never getting called from atomic context, dccp_init() calls __get_free_pages() with GFP_ATOMIC

Re: [PATCH] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Jia-Ju Bai
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

[PATCH v2] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Jia-Ju Bai
Jia-Ju Bai --- 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 --- a/net/decnet/dn_route.c +++ b/

[PATCH v2] net: dccp: Replace GFP_ATOMIC with GFP_KERNEL in dccp_init

2018-04-09 Thread Jia-Ju Bai
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 --- v2: * Modify the description of GFP_ATOMIC in v1. Thank Eric for good advice

[PATCH v2] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-09 Thread Jia-Ju Bai
s tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- 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 --git a/net/tipc/monitor.c b/ne

[PATCH v2] net: nsci: Replace GFP_ATOMIC with GFP_KERNEL in ncsi_register_dev

2018-04-09 Thread Jia-Ju Bai
also manually check it. Signed-off-by: Jia-Ju Bai --- 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/ncsi-manage.c index 3fd3c39..6b5b

[PATCH v2] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-09 Thread Jia-Ju Bai
s tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- 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 --git a/net/tipc/monitor.c b/ne

[PATCH v2] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Jia-Ju Bai
Jia-Ju Bai --- 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 --- a/net/decnet/dn_route.c +++ b/

[PATCH 2/2] net: wireless: zydas: Replace GFP_ATOMIC with GFP_KERNEL in zd1201_fw_upload

2018-04-10 Thread Jia-Ju Bai
allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/zy

[PATCH 1/2] net: wireless: zydas: Replace mdelay with msleep in zd1201_probe

2018-04-10 Thread Jia-Ju Bai
. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/zydas/zd1201.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/zydas/zd1201.c b/drivers/net/wireless/zy

[PATCH] net: wireless: cisco: airo: Replace mdelay with usleep_range in flashgchar

2018-04-10 Thread Jia-Ju Bai
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 --- drivers/net/wireless/cisco/airo.c | 2 +- 1 file changed, 1

[PATCH] net: wireless: b43legacy: Replace GFP_ATOMIC with GFP_KERNEL in dma_tx_fragment

2018-04-10 Thread Jia-Ju Bai
also manually check it. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/broadcom/b43legacy/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/b43legacy/dma.c b/drivers/net/wireless/broadcom/b43legacy/dma.c index cfa617d..2f0c64c 100644

[PATCH] net: wimax: i2400m: Replace GFP_ATOMIC with GFP_KERNEL in i2400m_tx_setup

2018-04-10 Thread Jia-Ju Bai
and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- drivers/net/wimax/i2400m/tx.c | 2 +- 1 file changed, 1 insert

[PATCH] net: sbni: Replace mdelay with msleep in sbni_probe1

2018-04-10 Thread Jia-Ju Bai
usily 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 --- drivers/net/wan/sbni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] net: usb: hso: Replace GFP_ATOMIC with GFP_KERNEL in hso_create_device

2018-04-10 Thread Jia-Ju Bai
is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- drivers/net/usb/hso.c | 2 +- 1 file changed

[PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload

2018-04-10 Thread Jia-Ju Bai
gned-off-by: Jia-Ju Bai --- 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/staging/irda/drivers/irda-usb.c +++ b

[PATCH 2/2] staging: irda: Replace mdelay with usleep_range in irda_usb_probe

2018-04-10 Thread Jia-Ju Bai
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 --- 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

[PATCH 1/2] net: can: sja1000: Replace mdelay with usleep_range in peak_pci_probe

2018-04-10 Thread Jia-Ju Bai
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 --- drivers/net/can/sja1000/peak_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/c

[PATCH 2/2] net: can: sja1000: Replace mdelay with usleep_range in pcan_add_channels

2018-04-10 Thread Jia-Ju Bai
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 --- drivers/net/can/sja1000/peak_pcmcia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] net: dsa: b53: Replace mdelay with msleep in b53_switch_reset_gpio

2018-04-10 Thread Jia-Ju Bai
myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- 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 100644 --- a/drivers/net/dsa/b53

[PATCH] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-10 Thread 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 --- drivers/net/ethernet/dec/tulip/de4x5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[PATCH] intel: i40evf: Replace GFP_ATOMIC with GFP_KERNEL in i40evf_add_vlan

2018-04-10 Thread Jia-Ju Bai
ten by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- 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/i40evf/i40evf_main.c index 182

[PATCH] net: ieee802154: atusb: Replace GFP_ATOMIC with GFP_KERNEL in atusb_probe

2018-04-10 Thread Jia-Ju Bai
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 --- drivers/net/ieee802154/atusb.c | 2 +- 1 file changed, 1 inser

[PATCH] net: samsung: sxgbe: Replace mdelay with usleep_range in sxgbe_sw_reset

2018-04-10 Thread Jia-Ju Bai
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 --

[PATCH] net: sun: cassini: Replace GFP_ATOMIC with GFP_KERNEL in cas_check_invariants

2018-04-10 Thread Jia-Ju Bai
h 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 --- d

[PATCH 2/2] isdn: hisax_fcpcipnp: Replace mdelay with usleep_range in fcpcipnp_setup

2018-04-10 Thread Jia-Ju Bai
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 --- drivers/isdn/hisax/his

[PATCH 1/2] isdn: hisax_fcpcipnp: Replace mdelay with usleep_range in fcpci_init

2018-04-10 Thread Jia-Ju Bai
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 --- dr

Re: [PATCH] net: dsa: b53: Replace mdelay with msleep in b53_switch_reset_gpio

2018-04-11 Thread Jia-Ju Bai
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] b53_switch_reset_gpio() <- b53_switch_reset() <- b53_reset_switch() <-

Re: [PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload

2018-04-11 Thread Jia-Ju Bai
On 2018/4/11 14:41, Greg KH wrote: On Wed, Apr 11, 2018 at 09:29:34AM +0800, Jia-Ju Bai wrote: stir421x_fw_upload() is never called in atomic context. The call chain ending up at stir421x_fw_upload() is: [1] stir421x_fw_upload() <- stir421x_patch_device() <- irda_usb_probe() irda_usb

Re: [PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload

2018-04-11 Thread Jia-Ju Bai
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: stir421x_fw_upload() is never called in atomic context. The call chain ending up at

Re: [PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload

2018-04-11 Thread Jia-Ju Bai
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

Re: [PATCH v2] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-11 Thread Jia-Ju Bai
On 2018/4/11 18:11, Ying Xue wrote: On 04/10/2018 09:17 AM, Jia-Ju Bai wrote: tipc_mon_create() is never called in atomic context. The call chain ending up at dn_route_init() is: Sorry, I don't think there is any relationship between the following call chain with dn_route_init().

[PATCH v3] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-11 Thread Jia-Ju Bai
s tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- v2: * Modify the description of GFP_ATOMIC in v1. Thank Eric for good advice. v3: * Modify wrong text in description in v2. Thank Ying for good advice. --- net/tipc/monitor.c | 6 +++--- 1 file c

Re: [PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload

2018-04-11 Thread Jia-Ju Bai
On 2018/4/11 22:26, David Miller wrote: From: Jia-Ju Bai 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, thanks for pointing it out. I will

[PATCH v2] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread 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 --- v2: * Use usleep_range() to correct usleep() in v1. --- drivers/net/ethernet/dec/tulip/de4x5.c | 2

[PATCH v2] net: samsung: sxgbe: Replace mdelay with usleep_range in sxgbe_sw_reset

2018-04-11 Thread Jia-Ju Bai
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 ---

Re: [PATCH v2] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread Jia-Ju Bai
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

[PATCH v2] net: dsa: b53: Using sleep-able operations in b53_switch_reset_gpio

2018-04-11 Thread Jia-Ju Bai
sis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- 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 1 file changed,

Re: [PATCH] net: dsa: b53: Replace mdelay with msleep in b53_switch_reset_gpio

2018-04-11 Thread Jia-Ju Bai
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

Re: [PATCH v2] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread Jia-Ju Bai
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

[PATCH] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Jia-Ju Bai
. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai --- crypto/shash.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/shash.c b/crypto/shash.c index 5e31c8d..8fcecc6 100644 --- a/crypto/shash.c +++ b/crypto/shash.c @@ -41,7 +41,7

[PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Jia-Ju Bai
it, GFP_KERNEL is replaced with GFP_ATOMIC. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai --- crypto/shash.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/shash.c b/crypto/shash.c index 5e31c8d..8fcecc6 100644 --- a

[PATCH] sky2: Replace mdelay with msleep in sky2_vpd_wait

2017-12-23 Thread Jia-Ju Bai
sky2_vpd_wait is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with msleep, to reduce busy wait. Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/marvell/sky2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

  1   2   3   >