[PATCH] net: macb: fix ref count leaking via pm_runtime_get_sync

2020-06-13 Thread Navid Emamdoost
in macb_mdio_write, macb_mdio_read, and at91ether_open, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/net/ethernet/cadenc

[PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails

2020-06-13 Thread Navid Emamdoost
in fec_enet_mdio_read, fec_enet_mdio_write, fec_enet_get_regs, fec_enet_open and fec_drv_remove, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Em

Re: [PATCH v2 1/2] perf tools: Fix potential memory leaks in perf events parser

2020-06-13 Thread Chen Wandun
在 2020/6/12 2:50, Markus Elfring 写道: Fix memory leak of in function parse_events_term__sym_hw() and parse_events_term__clone() when error occur. How do you think about a wording variant like the following? Release a configuration object after a string duplication failed. Thank you for y

[PATCH] Fix null pointer dereference in vector_user_bpf

2020-06-13 Thread Gaurav Singh
The bpf_prog is being checked for !NULL after uml_kmalloc but later its used directly for example: bpf_prog->filter = bpf and is also later returned upon success. Fix this, do a NULL check and return right away. Signed-off-by: Gaurav Singh --- arch/um/drivers/vector_user.c | 8 +--- 1 file

Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-13 Thread David Ahern
On 6/12/20 10:49 AM, Andrea Mayer wrote: > @@ -37,6 +45,15 @@ struct l3mdev_ops { > > #ifdef CONFIG_NET_L3_MASTER_DEV > > +int l3mdev_table_lookup_register(enum l3mdev_type l3type, > + int (*fn)(struct net *net, u32 table_id)); > + > +void l3mdev_table_lookup_unreg

Re: [RFC,net-next, 2/5] vrf: track associations between VRF devices and tables

2020-06-13 Thread David Ahern
On 6/13/20 4:53 PM, Andrea Mayer wrote: > Hi Stephen, > thanks for your questions. > > On Sat, 13 Jun 2020 12:28:59 -0700 > Stephen Hemminger wrote: > >>> + >>> +* Conversely, shared_table is decreased when a vrf is de-associated >>> +* from a table with exactly two associated vrfs. >>>

Re: [RFC,net-next, 0/5] Strict mode for VRF

2020-06-13 Thread David Ahern
On 6/13/20 4:39 PM, Dinesh Dutt wrote: > Understand Andrea. I guess I didn't say it well. What I meant to say was > that the strict mode is the default expected behavior in a classical router. > it has to be off by default for backwards compatibility.

Re: [GIT] Networking

2020-06-13 Thread pr-tracker-bot
The pull request you sent on Sat, 13 Jun 2020 15:54:03 -0700 (PDT): > git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net refs/heads/master has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/96144c58abe7ff767e754b5b80995f7b8846d49b Thank you! -- Deet-doot-dot, I am

[GIT] Networking

2020-06-13 Thread David Miller
1) Fix cfg80211 deadlock, from Johannes Berg. 2) RXRPC fails to send norigications, from David Howells. 3) MPTCP RM_ADDR parsing has an off by one pointer error, fix from Geliang Tang. 4) Fix crash when using MSG_PEEK with sockmap, from Anny Hu. 5) The ucc_geth driver needs __netdev_watchd

Re: [RFC,net-next, 2/5] vrf: track associations between VRF devices and tables

2020-06-13 Thread Andrea Mayer
Hi Stephen, thanks for your questions. On Sat, 13 Jun 2020 12:28:59 -0700 Stephen Hemminger wrote: > > + > > +* Conversely, shared_table is decreased when a vrf is de-associated > > +* from a table with exactly two associated vrfs. > > +*/ > > + int shared_tables; > > Should this

Re: [RFC,net-next, 3/5] vrf: add sysctl parameter for strict mode

2020-06-13 Thread Andrea Mayer
On Fri, 12 Jun 2020 10:52:27 -0700 Jakub Kicinski wrote: > drivers/net/vrf.c:1771:49: warning: incorrect type in argument 3 (different > address spaces) > drivers/net/vrf.c:1771:49:expected void * > drivers/net/vrf.c:1771:49:got void [noderef] *buffer > drivers/net/vrf.c:1785:35: warnin

Re: [PATCH] net: ethernet: ti: ale: fix allmulti for nu type ale

2020-06-13 Thread David Miller
From: Grygorii Strashko Date: Sat, 13 Jun 2020 17:54:14 +0300 > On AM65xx MCU CPSW2G NUSS and 66AK2E/L NUSS allmulti setting does not allow > unregistered mcast packets to pass. > > This happens, because ALE VLAN entries on these SoCs do not contain port > masks for reg/unreg mcast packets, but

Re: [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init

2020-06-13 Thread David Miller
From: Grygorii Strashko Date: Sat, 13 Jun 2020 17:52:59 +0300 > The ALE parameters structure is created on stack, so it has to be reset > before passing to cpsw_ale_create() to avoid garbage values. > > Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth > subsystem drive

Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-13 Thread Andrea Mayer
On Fri, 12 Jun 2020 10:51:48 -0700 Jakub Kicinski wrote: > net/l3mdev/l3mdev.c:12:1: warning: symbol 'l3mdev_lock' was not declared. > Should it be static? > > Please make sure it doesn't add errors with W=1 C=1 :) Hi Jakub, thanks for your feedback. sorry, I did not want to add more warnings

Re: [RFC,net-next, 0/5] Strict mode for VRF

2020-06-13 Thread Andrea Mayer
On Fri, 12 Jun 2020 10:05:49 -0700 Dinesh G Dutt wrote: > Thanks for doing this Andrea. This is a very important patch. I'll let > the others comment on the specificity of the patch, but strict mode=1 > should be the default . > > Dinesh Hi Dinesh, thanks for your comments! I chose to disable

Re: [PATCH v3] net: atm: Remove the error message according to the atomic context

2020-06-13 Thread David Miller
From: Yi Wang Date: Sat, 13 Jun 2020 14:03:26 +0800 > From: Liao Pingfang > > Looking into the context (atomic!) and the error message should be dropped. > > Signed-off-by: Liao Pingfang > --- > Changes in v3: remove {} as there is only one statement left. Applied, thank you.

Re: pull-request: bpf 2020-06-12

2020-06-13 Thread David Miller
From: Alexei Starovoitov Date: Fri, 12 Jun 2020 17:45:47 -0700 > The following pull-request contains BPF updates for your *net* tree. > > We've added 26 non-merge commits during the last 10 day(s) which contain > a total of 27 files changed, 348 insertions(+), 93 deletions(-). > > The main chan

Re: [RFC PATCH bpf-next 8/8] tools/bpftool: show PIDs with FDs open against BPF map/prog/link/btf

2020-06-13 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 12, 2020 at 10:57:59PM -0700, Andrii Nakryiko escreveu: > On Fri, Jun 12, 2020 at 8:45 PM Alexei Starovoitov > wrote: > > > > On Fri, Jun 12, 2020 at 03:31:50PM -0700, Andrii Nakryiko wrote: > > > Add bpf_iter-based way to find all the processes that hold open FDs > > > against > > >

[PATCH net] MAINTAINERS: merge entries for felix and ocelot drivers

2020-06-13 Thread Vladimir Oltean
From: Vladimir Oltean The ocelot switchdev driver also provides a set of library functions for the felix DSA driver, which in practice means that most of the patches will be of interest to both groups of driver maintainers. So, as also suggested in the discussion here, let's merge the 2 entries

[PATCH] MAINTAINERS: switch to my private email for Renesas Ethernet drivers

2020-06-13 Thread Sergei Shtylyov
Subject: MAINTAINERS: switch to my private email for Renesas Ethernet drivers I no longer work for Cogent Embedded (but my old email still works :-)), and still would like to continue looking after the Renesas Ethernet drivers and bindings. Let's switch to my private email. Signed-off-by: Sergei

Re: [RFC PATCH v4 2/2] net: dsa: qca8k: Improve SGMII interface handling

2020-06-13 Thread Vladimir Oltean
On Sat, 13 Jun 2020 at 14:32, Jonathan McDowell wrote: > > This patch improves the handling of the SGMII interface on the QCA8K > devices. Previously the driver did no configuration of the port, even if > it was selected. We now configure it up in the appropriate > PHY/MAC/Base-X mode depending on

Re: [RFC PATCH v4 1/2] net: dsa: qca8k: Switch to PHYLINK instead of PHYLIB

2020-06-13 Thread Vladimir Oltean
On Sat, 13 Jun 2020 at 14:31, Jonathan McDowell wrote: > > Update the driver to use the new PHYLINK callbacks, removing the > legacy adjust_link callback. > > Signed-off-by: Jonathan McDowell > --- > drivers/net/dsa/qca8k.c | 308 +++- > 1 file changed, 211 in

Re: [RFC,net-next, 2/5] vrf: track associations between VRF devices and tables

2020-06-13 Thread Stephen Hemminger
On Fri, 12 Jun 2020 18:49:34 +0200 Andrea Mayer wrote: > + /* shared_tables: > + * count how many distinct tables does not comply with the > + * strict mode requirement. > + * shared_table value must be 0 in order to switch to strict mode. > + * > + * example of evolu

Re: [Crash] unhandled kernel memory read from unreadable memory

2020-06-13 Thread Cong Wang
Hello, On Sat, Jun 13, 2020 at 5:41 AM Peter Geis wrote: > > Good Morning, > > Last night I started experiencing crashes on my home server. > I updated to 5.6.17 from 5.6.15 a few days ago but I'm not sure if > that is related. > The crash occurred four times between last night and this morning.

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-13 Thread Taehee Yoo
On Thu, 11 Jun 2020 at 08:21, Cong Wang wrote: > Hi Cong :) > On Wed, Jun 10, 2020 at 7:48 AM Taehee Yoo wrote: > > > > On Tue, 9 Jun 2020 at 06:53, Cong Wang wrote: > > > > > > > Hi Cong, > > Thank you for this work! > > > > > The dynamic key update for addr_list_lock still causes troubles, >

Re: [PATCH] sctp: Fix sk_buff leak when receiving a datagram

2020-06-13 Thread Neil Horman
On Sat, Jun 13, 2020 at 08:39:25PM +0800, Xiyu Yang wrote: > In sctp_skb_recv_datagram(), the function fetch a sk_buff object from > the receiving queue to "skb" by calling skb_peek() or __skb_dequeue() > and return its reference to the caller. > > However, when calling __skb_dequeue() successfull

[PATCH] net: ethernet: ti: ale: fix allmulti for nu type ale

2020-06-13 Thread Grygorii Strashko
On AM65xx MCU CPSW2G NUSS and 66AK2E/L NUSS allmulti setting does not allow unregistered mcast packets to pass. This happens, because ALE VLAN entries on these SoCs do not contain port masks for reg/unreg mcast packets, but instead store indexes of ALE_VLAN_MASK_MUXx_REG registers which intended f

[PATCH] net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init

2020-06-13 Thread Grygorii Strashko
The ALE parameters structure is created on stack, so it has to be reset before passing to cpsw_ale_create() to avoid garbage values. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cp

Re: r816x driver

2020-06-13 Thread Lauri Jakku
Hi, On 13.6.2020 1.46, Lauri Jakku wrote: Hi, As you may recall i've started to debug r816x driver: Why it does not work, and i'm allmost certain there is something fishy in probeing ... 1st try always fails, and second try with my patch seems to work ok. https://forum.manjaro.org/t/re-

Re: [PATCH] net: Fix the arp error in some cases

2020-06-13 Thread David Ahern
On 6/13/20 12:49 AM, guodeqing wrote: > ie., > $ ifconfig eth0 6.6.6.6 netmask 255.255.255.0 > > $ ip rule add from 6.6.6.6 table without a default entry in table the lookup proceeds to the next table - which by default is the main table. > > $ ip route add 9.9.9.9 via 6.6.6.6 > > $

[PATCH] sctp: Fix sk_buff leak when receiving a datagram

2020-06-13 Thread Xiyu Yang
In sctp_skb_recv_datagram(), the function fetch a sk_buff object from the receiving queue to "skb" by calling skb_peek() or __skb_dequeue() and return its reference to the caller. However, when calling __skb_dequeue() successfully, the function forgets to hold a reference count of the "skb" object

[Crash] unhandled kernel memory read from unreadable memory

2020-06-13 Thread Peter Geis
Good Morning, Last night I started experiencing crashes on my home server. I updated to 5.6.17 from 5.6.15 a few days ago but I'm not sure if that is related. The crash occurred four times between last night and this morning. [23352.431106] rockpro64 kernel: Unable to handle kernel read from unre

[RFC PATCH v4 2/2] net: dsa: qca8k: Improve SGMII interface handling

2020-06-13 Thread Jonathan McDowell
This patch improves the handling of the SGMII interface on the QCA8K devices. Previously the driver did no configuration of the port, even if it was selected. We now configure it up in the appropriate PHY/MAC/Base-X mode depending on what phylink tells us we are connected to and ensure it is enable

[RFC PATCH v4 0/2] net: dsa: qca8k: Improve SGMII interface handling

2020-06-13 Thread Jonathan McDowell
Hopefully getting there, thanks for all the review comments. This 2 patch series migrates the qca8k switch driver over to PHYLINK, and then adds the SGMII clean-ups (i.e. the missing initialisation) on top of that as a second patch. As before, tested with a device where the CPU connection is RGMI

[RFC PATCH v4 1/2] net: dsa: qca8k: Switch to PHYLINK instead of PHYLIB

2020-06-13 Thread Jonathan McDowell
Update the driver to use the new PHYLINK callbacks, removing the legacy adjust_link callback. Signed-off-by: Jonathan McDowell --- drivers/net/dsa/qca8k.c | 308 +++- 1 file changed, 211 insertions(+), 97 deletions(-) diff --git a/drivers/net/dsa/qca8k.c b/dr

[PATCH net v2 4/4] flow_offload: fix the list_del corruption in the driver list

2020-06-13 Thread wenxu
From: wenxu When a indr device add in offload success. After the representor go away. All the flow_block_cb cleanup but miss del form driver list. Fixes: 0fdcf78d5973 ("net: use flow_indr_dev_setup_offload()") Signed-off-by: wenxu --- net/netfilter/nf_flow_table_offload.c | 1 + net/netfilter/

[PATCH net v2 2/4] flow_offload: fix incorrect cb_priv check for flow_block_cb

2020-06-13 Thread wenxu
From: wenxu In the function __flow_block_indr_cleanup, The match stataments this->cb_priv == cb_priv is always false, the flow_block_cb->cb_priv is totally different data with the flow_indr_dev->cb_priv. Store the representor cb_priv to the flow_block_cb->indr.cb_priv in the driver. Fixes: 1fac

[PATCH net v2 3/4] net/sched: cls_api: fix nooffloaddevcnt warning dmesg log

2020-06-13 Thread wenxu
From: wenxu The block->nooffloaddevcnt should always count for indr block. even the indr block offload successful. The representor maybe gone away and the ingress qdisc can work in software mode. block->nooffloaddevcnt warning with following dmesg log: [ 760.667058] ###

[PATCH net v2 1/4] flow_offload: fix incorrect cleanup for indirect flow_blocks

2020-06-13 Thread wenxu
From: wenxu If the representor is removed, then identify the indirect flow_blocks that need to be removed by the release callback. Fixes: 1fac52da5942 ("net: flow_offload: consolidate indirect flow_block infrastructure") Signed-off-by: wenxu --- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c