[PATCH] net: arcnet: com20020 fix error handling

2021-03-14 Thread Tong Zhang
: [1.536939] com20020pci_probe+0x3f2/0x48c [com20020_pci] [1.537226] local_pci_probe+0x48/0x80 [1.539918] com20020pci_init+0x3f/0x1000 [com20020_pci] Signed-off-by: Tong Zhang --- drivers/net/arcnet/com20020-pci.c | 34 +-- 1 file changed, 19 insertions(+), 15

[PATCH] isdn: remove extra spaces in the header file

2021-03-10 Thread Tong Zhang
fix some coding style issues in the isdn header Signed-off-by: Tong Zhang --- drivers/isdn/hardware/mISDN/iohelper.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/isdn/hardware/mISDN/iohelper.h b/drivers/isdn/hardware/mISDN/iohelper.h index

[PATCH] mISDN: fix crash in fritzpci

2021-03-10 Thread Tong Zhang
6a0 [1.749073] __do_sys_finit_module+0xc2/0x120 [1.749307] ? __do_sys_finit_module+0xc2/0x120 [1.749549] __x64_sys_finit_module+0x1a/0x20 [1.749782] do_syscall_64+0x38/0x90 Signed-off-by: Tong Zhang --- drivers/isdn/hardware/mISDN/mISDNipac.c | 2 +- 1 file changed, 1 insertion(+)

Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-08 Thread Tong Zhang
een in use since at least back when Linus switched over > to git in 2005. > > Thanks, > > - Alex > > On Mon, Mar 8, 2021 at 9:55 AM Tong Zhang wrote: > > > > Hi Alex, > > attached is the kernel log for zatm(uPD98402) -- I also have > > idt77252's log

Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-08 Thread Tong Zhang
57029] R13: R14: 01092dd0 R15: 0001 On Mon, Mar 8, 2021 at 12:47 PM Alexander Duyck wrote: > > On Mon, Mar 8, 2021 at 12:39 AM Tong Zhang wrote: > > > > there are two drivers(zatm and idt77252) using PRIV() (i.e. atm->phy_data) > > to st

[PATCH 2/3] atm: uPD98402: fix incorrect allocation

2021-03-07 Thread Tong Zhang
data instead of dev_data. Signed-off-by: Tong Zhang --- drivers/atm/uPD98402.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/atm/uPD98402.c b/drivers/atm/uPD98402.c index 7850758b5bb8..239852d85558 100644 --- a/drivers/atm/uPD98402.c +++ b/drivers/atm/uPD98402.c @

[PATCH 3/3] atm: idt77252: fix null-ptr-dereference

2021-03-07 Thread Tong Zhang
tly. Signed-off-by: Tong Zhang --- drivers/atm/idt77105.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c index 3c081b6171a8..bfca7b8a6f31 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c @@ -262,7 +262,7 @@ static

[PATCH 1/3] atm: fix a typo in the struct description

2021-03-07 Thread Tong Zhang
phy_data means private PHY data not date Signed-off-by: Tong Zhang --- include/linux/atmdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 60cd25c0461b..9b02961d65ee 100644 --- a/include/linux/atmdev.h +++ b/include

[PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-07 Thread Tong Zhang
a typo in atm struct. Tong Zhang (3): atm: fix a typo in the struct description atm: uPD98402: fix incorrect allocation atm: idt77252: fix null-ptr-dereference drivers/atm/idt77105.c | 4 ++-- drivers/atm/uPD98402.c | 2 +- include/linux/atmdev.h | 2 +- 3 files changed, 4 insertions

Re: [PATCH] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-02 Thread Tong Zhang
On Mon, Mar 1, 2021 at 2:49 PM Marc Kleine-Budde wrote: > > On 28.02.2021 23:15:48, Tong Zhang wrote: > > Currently doing modprobe c_can_pci will make kernel complain > > "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() > > called before pm

[PATCH v2] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-02 Thread Tong Zhang
Currently doing modprobe c_can_pci will make kernel complain "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() called before pm is initialized. This fix is similar to 227619c3ff7c, move those pm_enable/disable code to c_can_platform. Signed-off-by: Tong Zhang --

[PATCH] can: c_can: move runtime PM enable/disable to c_can_platform

2021-02-28 Thread Tong Zhang
pm_enable/disable code to c_can_platform. Signed-off-by: Tong Zhang --- drivers/net/can/c_can/c_can.c | 26 ++ drivers/net/can/c_can/c_can_platform.c | 6 +- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net

[PATCH] can: c_can_pci: fix use-after-free

2021-02-28 Thread Tong Zhang
ff ff [ 1795.762392] == Signed-off-by: Tong Zhang --- drivers/net/can/c_can/c_can_pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c

[PATCH] atm: lanai: dont run lanai_dev_close if not open

2021-02-27 Thread Tong Zhang
00 [8.353397] DR3: DR6: fffe0ff0 DR7: 0400 [8.353958] modprobe (95) used greatest stack depth: 26216 bytes left Signed-off-by: Tong Zhang --- drivers/atm/lanai.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/atm/lan

[PATCH] atm: eni: dont release is never initialized

2021-02-27 Thread Tong Zhang
01 [4.891691] R10: 7ff62fd55300 R11: 0246 R12: 00f2b9e0 [4.892064] R13: R14: 00f2bdd0 R15: 0001 [4.892439] ====== Signed-off-by: Tong Zhang --- drivers/atm/eni.c |

[PATCH] net: wan/lmc: dont print format string when not available

2021-02-15 Thread Tong Zhang
dev->name is determined only after calling register_hdlc_device(), however ,it is used by printk before the name is fully determined. [4.565137] hdlc%d: detected at e800, irq 11 Instead of printing out a %d, print hdlc directly Signed-off-by: Tong Zhang --- drivers/net/wan/

[PATCH] net: wan/lmc: unregister device when no matching device is found

2021-02-15 Thread Tong Zhang
349] == Signed-off-by: Tong Zhang --- drivers/net/wan/lmc/lmc_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 93c7e8502845..ebb568f9bc66 100644 --- a/drivers/net/wan/lmc/lmc_main.c ++

[PATCH v1] atm: idt77252: fix build broken on amd64

2021-02-14 Thread Tong Zhang
runtime size check to buildtime size check in idt77252_init() Signed-off-by: Tong Zhang --- drivers/atm/idt77252.c | 11 +-- drivers/atm/idt77252.h | 2 +- include/linux/atmdev.h | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/atm/idt77252.c b/drivers/at

Re: [PATCH] enetc: auto select PHYLIB and MDIO_DEVRES

2021-02-11 Thread Tong Zhang
Thanks for the comments! I have sent a revised patch. - Tong On Thu, Feb 11, 2021 at 12:38 PM Florian Fainelli wrote: > > On 2/11/21 8:09 AM, Tong Zhang wrote: > > FSL_ENETC_MDIO use symbols from PHYLIB and MDIO_DEVRES, however they are > > not auto selected. >

[PATCH v2] enetc: auto select PHYLIB and MDIO_DEVRES

2021-02-11 Thread Tong Zhang
t/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined! ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined! add depends on MDIO_DEVRES && MDIO_BUS Signed-off-by: Tong Zhang --- v2:change to depends on MDIO_DEVRES&&

[PATCH] enetc: auto select PHYLIB and MDIO_DEVRES

2021-02-11 Thread Tong Zhang
tc/fsl-enetc-mdio.ko] undefined! ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined! auto select MDIO_DEVRES and PHYLIB when FSL_ENETC_MDIO is selected. Signed-off-by: Tong Zhang --- drivers/net/ethernet/freescale/enetc/Kco

[PATCH] e1000: do not panic on malformed rx_desc

2020-09-08 Thread Tong Zhang
687637] e1000_clean_rx_irq+0x311/0x630 [ 167.687852] e1000e_poll+0x19a/0x4d0 [ 167.688038] ? e1000_watchdog_task+0x9d0/0x9d0 [ 167.688262] ? credit_entropy_bits.constprop.0+0x6f/0x1c0 [ 167.688527] net_rx_action+0x26e/0x650 Signed-off-by: Tong Zhang --- drivers/net/ethernet/intel

[PATCH] e1000e: do not panic on malformed rx_desc

2020-09-08 Thread Tong Zhang
847334] e1000_clean_rx_irq+0x311/0x630 Signed-off-by: Tong Zhang --- drivers/net/ethernet/intel/e1000e/netdev.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 664e8ccc88d2..f12bd00b2dbf 100644 --- a/d

Re: [PATCH] netfilter: nf_conntrack_sip: fix parsing error

2020-08-28 Thread Tong Zhang
I think the original code complaining parsing error is there for a reason, A better way is to modify ct_sip_parse_numerical_param() and let it return a real parsing error code instead of returning FOUND(1) and NOT FOUND(0) if deemed necessary Once again I'm not an expert and I'm may suggest somethi

Re: [PATCH] netfilter: nf_conntrack_sip: fix parsing error

2020-08-28 Thread Tong Zhang
Hi Pablo, I'm not an expert in this networking stuff. But from my point of view there's no point in checking if this condition is always true. There's also no need of returning anything from the ct_sip_parse_numerical_param() if they are all being ignored like this. On Fri, Aug 28, 2020 at 2:07 PM

[PATCH] net: caif: fix error code handling

2020-08-24 Thread Tong Zhang
cfpkt_peek_head return 0 and 1, caller is checking error using <0 Signed-off-by: Tong Zhang --- net/caif/cfrfml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c index ce2767e9cec6..7b0af33bdb97 100644 --- a/net/caif/cfrfml.c ++

[PATCH] netfilter: nf_conntrack_sip: fix parsing error

2020-08-15 Thread Tong Zhang
ct_sip_parse_numerical_param can only return 0 or 1, but the caller is checking parsing error using < 0 Signed-off-by: Tong Zhang --- net/netfilter/nf_conntrack_sip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfil