[PATCH v2] PM: runtime: replace pm_runtime_resume_and_get with pm_runtime_resume_and_get_sync

2020-11-28 Thread Zhang Qilong
]https://lore.kernel.org/netdev/20201110092933.3342784-1-zhangqilo...@huawei.com/T/#t Fixes: dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") Signed-off-by: Zhang Qilong --- Changelog: v2 - change the fixes tag. --- drivers/net/ethernet/freescale/

[PATCH 2/2] can: kvaser_pciefd: Fix error handling in kvaser_pciefd_open

2020-11-28 Thread Zhang Qilong
If kvaser_pciefd_bus_on failed, we should call close_candev to avoid reference leak. Fixes: 26ad340e582d3 ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by: Zhang Qilong --- drivers/net/can/kvaser_pciefd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[PATCH 1/2] can: c_can: Fix error handling in c_can_power_up

2020-11-28 Thread Zhang Qilong
de85acc23f ("can: c_can: Add d_can raminit support") Signed-off-by: Zhang Qilong --- drivers/net/can/c_can/c_can.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 0420f09f2b70..becfd

[PATCH 0/2] can: Fix the error handling in c_can_power_up and kvaser_pciefd_open

2020-11-28 Thread Zhang Qilong
The patch series fix the error handling to avoid the reference leak and wrong state for the net device. Zhang Qilong (2): can: c_can: Fix error handling in c_can_power_up can: kvaser_pciefd: Fix error handling in kvaser_pciefd_open drivers/net/can/c_can/c_can.c | 18

[PATCH] PM: runtime: replace pm_runtime_resume_and_get with pm_runtime_resume_and_get_sync

2020-11-27 Thread Zhang Qilong
]https://lore.kernel.org/netdev/20201110092933.3342784-1-zhangqilo...@huawei.com/T/#t Fixes: dd8088d5a8969dc2 ("PM runtime: Add pm_runtime_resume_and_get to deal with usage counter") Signed-off-by: Zhang Qilong --- drivers/net/ethernet/freescale/fec_main.c | 10 +- inc

[PATCH] can: ti_hecc: Fix memleak in ti_hecc_probe

2020-11-14 Thread Zhang Qilong
In the error handling, we should goto the probe_exit_candev to free ndev to prevent memory leak. Fixes: dabf54dd1c63 ("can: ti_hecc: Convert TI HECC driver to DT only driver") Signed-off-by: Zhang Qilong --- drivers/net/can/ti_hecc.c | 13 - 1 file changed, 8 insert

[PATCH] ipv6: Fix error path to cancel the meseage

2020-11-12 Thread Zhang Qilong
genlmsg_cancel() needs to be called in the error path of inet6_fill_ifmcaddr and inet6_fill_ifacaddr to cancel the message. Fixes: 203651b665f72 ("ipv6: add inet6_fill_args") Reported-by: Hulk Robot Signed-off-by: Zhang Qilong --- net/ipv6/addrconf.c | 8 ++-- 1 file changed, 6

[PATCH v3 0/2] Fix usage counter leak by adding a general sync ops

2020-11-10 Thread Zhang Qilong
with the usage counter for better coding and view. Then, we replace pm_runtime_resume_and_get with it in fec_main.c to avoid it. [0]https://lkml.org/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139 Zhang Qilong (2): PM: runtime: Add pm_runtime_resume_and_get

[PATCH v3 1/2] PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter

2020-11-10 Thread Zhang Qilong
with the usage counter for better coding. [0]https://lkml.org/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139 Signed-off-by: Zhang Qilong --- include/linux/pm_runtime.h | 21 + 1 file changed, 21 insertions(+) diff --git a/include/linux

[PATCH v3 2/2] net: fec: Fix reference count leak in fec series ops

2020-11-10 Thread Zhang Qilong
reference count leak. Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we fixed it by replacing it with pm_runtime_resume_and_get. Fixes: 8fff755e9f8d0 ("net: fec: Ensure clocks are enabled while using mdio bus") Signed-off-by: Zh

[PATCH v2 0/2] Fix usage counter leak by adding a general sync ops

2020-11-09 Thread Zhang Qilong
and view. Then, we replace pm_runtime_get_sync with it in fec_main.c Zhang Qilong (2): PM: runtime: Add a general runtime get sync operation to deal with usage counter net: fec: Fix reference count leak in fec series ops drivers/net/ethernet/freescale/fec_main.c | 12 - include

[PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Zhang Qilong
. [0]https://lkml.org/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/patch/20200520095148.10995-1-dinghao@zju.edu.cn/ Signed-off-by: Zhang Qilong --- include/linux/pm_runtime.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include

[PATCH v2 2/2] net: fec: Fix reference count leak in fec series ops

2020-11-09 Thread Zhang Qilong
reference count leak. Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we fixed it by replacing it with pm_runtime_general_get. Fixes: 8fff755e9f8d0 ("net: fec: Ensure clocks are enabled while using mdio bus") Signed-off-by: Zh

[PATCH 2/2] net: fec: Fix reference count leak in fec series ops

2020-11-09 Thread Zhang Qilong
reference count leak. Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we fixed it by replacing it with gene_pm_runtime_get_sync. Fixes: 8fff755e9f8d0 ("net: fec: Ensure clocks are enabled while using mdio bus") Signed-off-by: Zh

[PATCH 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Zhang Qilong
. [0]https://lkml.org/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/patch/20200520095148.10995-1-dinghao@zju.edu.cn/ Signed-off-by: Zhang Qilong --- include/linux/pm_runtime.h | 32 1 file changed, 32 insertions(+) diff --git a/include

[PATCH 0/2] Fix usage counter leak by adding a general sync ops

2020-11-09 Thread Zhang Qilong
/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/patch/20200520095148.10995-1-dinghao@zju.edu.cn/ Zhang Qilong (2): PM: runtime: Add a general runtime get sync operation to deal with usage counter net: fec: Fix reference count leak in fec series ops drivers/net

[PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread Zhang Qilong
reference count leak. Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we fixed it through adding pm_runtime_put_noidle. Fixes: 8fff755e9f8d0 ("net: fec: Ensure clocks are enabled while using mdio bus") Signed-off-by: Zhang Qilong --- d

[PATCH v2] can: flexcan: fix reference count leak in flexcan ops

2020-11-08 Thread Zhang Qilong
me PM") Signed-off-by: Zhang Qilong --- Changelog: v2 - removed empty lines between tags. --- drivers/net/can/flexcan.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 881799bd9c5e..c42a1ae5ee46 100644 --- a/d

[PATCH] can: flexcan: fix reference count leak in flexcan ops

2020-11-07 Thread Zhang Qilong
me PM") Signed-off-by: Zhang Qilong --- drivers/net/can/flexcan.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 881799bd9c5e..c42a1ae5ee46 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c

[PATCH] iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed

2020-10-30 Thread Zhang Qilong
In the error path of iwl_mvm_mac_ctxt_beacon_changed, the beacon it not be freed, and use dev_kfree_skb to free it. Signed-off-by: Zhang Qilong --- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel

[PATCH -next] net/mac8390: discard unnecessary breaks

2020-10-27 Thread Zhang Qilong
The 'break' is unnecessary because of previous 'return', and we could discard it. Signed-off-by: Zhang Qilong --- drivers/net/ethernet/8390/mac8390.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/net/ethernet/8390/mac8390.c b/drivers/net/ethernet/

[PATCH v2 -next] neigh: Adjustment calculation method of neighbour path symbols

2020-10-25 Thread Zhang Qilong
Using size of "net//neigh/" is not clear, the use of stitching("net/" + /neigh") should be clearer. Signed-off-by: Zhang Qilong --- net/core/neighbour.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neigh

[PATCH -next] neigh: remove the extra slash

2020-10-23 Thread Zhang Qilong
The normal path has only one slash. Signed-off-by: Zhang Qilong --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 8e39e28b0a8d..503501842a7d 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c