Re: [PATCH 3/3] net: skb_queue_purge(): lock/unlock the list only once

2017-09-08 Thread Stephen Hemminger
On Fri, 08 Sep 2017 05:06:30 - Michael Witten wrote: > Date: Thu, 7 Sep 2017 20:07:40 + > With this commit, the list's lock is locked/unlocked only once > for the duration of `skb_queue_purge()'. > > Hitherto, the list's lock has been locked/unlocked every time > an

Re: WARNING: CPU: 2 PID: 4277 at lib/refcount.c:186

2017-09-08 Thread Cong Wang
(Cc'ing netdev) On Fri, Sep 8, 2017 at 5:59 AM, Shankara Pailoor wrote: > Hi, > > I found a warning while fuzzing with Syzkaller on linux 4.13-rc7 on > x86_64. The full stack trace is below: > > WARNING: CPU: 2 PID: 4277 at lib/refcount.c:186 >

RE: [PATCH RFC 5/5] Add KSZ8795 SPI driver

2017-09-08 Thread Tristram.Ha
> -Original Message- > From: Pavel Machek [mailto:pa...@ucw.cz] > Sent: Friday, September 08, 2017 2:26 AM > To: Tristram Ha - C24268 > Cc: and...@lunn.ch; muva...@gmail.com; nathan.leigh.con...@gmail.com; > vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com; >

Re: [netfilter-core] [PATCH] netfilter: nat: constify rhashtable_params

2017-09-08 Thread Pablo Neira Ayuso
On Fri, Sep 08, 2017 at 01:46:30PM +0200, Pablo Neira Ayuso wrote: > On Wed, Aug 30, 2017 at 05:18:04PM +0530, Arvind Yadav wrote: > > rhashtable_params are not supposed to change at runtime. All > > Functions rhashtable_* working with const rhashtable_params > > provided by . So mark the

Re: [PATCH net] ipv6: fix memory leak with multiple tables during netns destruction

2017-09-08 Thread Cong Wang
On Fri, Sep 8, 2017 at 1:26 AM, Sabrina Dubroca wrote: > fib6_net_exit only frees the main and local tables. If another table was > created with fib6_alloc_table, we leak it when the netns is destroyed. > > Fix this in the same way ip_fib_net_exit cleans up tables, by

RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Tristram.Ha
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Friday, September 08, 2017 7:12 AM > To: Maxim Uvarov > Cc: Tristram Ha - C24268; Pavel Machek; Nathan Conrad; Vivien Didelot; Florian > Fainelli; netdev; linux-ker...@vger.kernel.org; Woojung Huh - C21699 > Subject:

Re: [PATCH RFC 5/5] Add KSZ8795 SPI driver

2017-09-08 Thread Andrew Lunn
> Sorry about the formatting. It seems my e-mail system needs to be checked > to make sure it does not auto-format the contents again. I've never seen issues like this with git send-email. Please use it. Email problems generally happen with the client, not the backend. What client did you use to

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Florian Fainelli
On 09/07/2017 02:11 PM, tristram...@microchip.com wrote: > From: Tristram Ha > > Add other KSZ switches support so that patch check does not complain. > > Signed-off-by: Tristram Ha > --- > Documentation/devicetree/bindings/net/dsa/ksz.txt

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Florian Fainelli
On 09/08/2017 12:01 PM, Andrew Lunn wrote: >>> So i would suggest one driver supporting all the different devices. >> >> There will be 5 drivers to support these devices: >> >> ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477 >> ksz8795.c - KSZ8795/KSZ8795/KSZ8765 >> ksz8895.c - KSZ8895/KSZ8864

Re: Use after free in __dst_destroy_metrics_generic

2017-09-08 Thread David Miller
From: Eric Dumazet Date: Fri, 08 Sep 2017 10:16:53 -0700 > On Fri, 2017-09-08 at 09:10 -0700, Cong Wang wrote: >> On Thu, Sep 7, 2017 at 5:52 PM, Subash Abhinov Kasiviswanathan >> wrote: >> > We are seeing a possible use after free in

Re: Use after free in __dst_destroy_metrics_generic

2017-09-08 Thread Eric Dumazet
On Fri, 2017-09-08 at 10:19 -0700, David Miller wrote: > From: Eric Dumazet > Date: Fri, 08 Sep 2017 10:16:53 -0700 > > > On Fri, 2017-09-08 at 09:10 -0700, Cong Wang wrote: > >> On Thu, Sep 7, 2017 at 5:52 PM, Subash Abhinov Kasiviswanathan > >>

Re: WARNING: CPU: 2 PID: 4277 at lib/refcount.c:186

2017-09-08 Thread Eric Dumazet
On Fri, 2017-09-08 at 10:21 -0700, Cong Wang wrote: > (Cc'ing netdev) > > On Fri, Sep 8, 2017 at 5:59 AM, Shankara Pailoor wrote: > > Hi, > > > > I found a warning while fuzzing with Syzkaller on linux 4.13-rc7 on > > x86_64. The full stack trace is below: > > > > WARNING:

Re: Use after free in __dst_destroy_metrics_generic

2017-09-08 Thread Subash Abhinov Kasiviswanathan
On 2017-09-08 10:10, Cong Wang wrote: On Thu, Sep 7, 2017 at 5:52 PM, Subash Abhinov Kasiviswanathan wrote: We are seeing a possible use after free in ip6_dst_destroy. It appears as if memory of the __DST_METRICS_PTR(old) was freed in some path and allocated to ion

RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Tristram.Ha
> -Original Message- > From: Maxim Uvarov [mailto:muva...@gmail.com] > Sent: Friday, September 08, 2017 12:00 PM > To: Florian Fainelli > Cc: Tristram Ha - C24268; Andrew Lunn; Pavel Machek; Nathan Conrad; Vivien > Didelot; netdev; linux-ker...@vger.kernel.org; Woojung Huh - C21699 >

Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

2017-09-08 Thread David Woodhouse
On Fri, 2017-09-08 at 10:16 -0700, David Miller wrote: > From: Eduardo Valentin > Date: Fri, 8 Sep 2017 10:04:09 -0700 > > > > > However, this is a clear, the system call, from the net subsystem, > > has changed in behavior across kernel versions. From application / > >

Re: [PATCH net] ipv6: fix memory leak with multiple tables during netns destruction

2017-09-08 Thread Eric Dumazet
On Fri, 2017-09-08 at 10:26 +0200, Sabrina Dubroca wrote: > fib6_net_exit only frees the main and local tables. If another table was > created with fib6_alloc_table, we leak it when the netns is destroyed. > > Fix this in the same way ip_fib_net_exit cleans up tables, by walking > through the

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Florian Fainelli
On 09/08/2017 11:40 AM, tristram...@microchip.com wrote: >> -Original Message- >> From: Andrew Lunn [mailto:and...@lunn.ch] >> Sent: Friday, September 08, 2017 7:12 AM >> To: Maxim Uvarov >> Cc: Tristram Ha - C24268; Pavel Machek; Nathan Conrad; Vivien Didelot; >> Florian >> Fainelli;

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Maxim Uvarov
2017-09-08 21:48 GMT+03:00 Florian Fainelli : > On 09/07/2017 02:11 PM, tristram...@microchip.com wrote: >> From: Tristram Ha >> >> Add other KSZ switches support so that patch check does not complain. >> >> Signed-off-by: Tristram Ha

[PATCH 9/9] netfilter: xt_hashlimit: fix build error caused by 64bit division

2017-09-08 Thread Pablo Neira Ayuso
From: Vishwanath Pai 64bit division causes build/link errors on 32bit architectures. It prints out error messages like: ERROR: "__aeabi_uldivmod" [net/netfilter/xt_hashlimit.ko] undefined! The value of avg passed through by userspace in BYTE mode cannot exceed U32_MAX. Which

[PATCH 4/9] netfilter: xtables: add scheduling opportunity in get_counters

2017-09-08 Thread Pablo Neira Ayuso
From: Florian Westphal There are reports about spurious softlockups during iptables-restore, a backtrace i saw points at get_counters -- it uses a sequence lock and also has unbounded restart loop. Signed-off-by: Florian Westphal Acked-by: Eric Dumazet

[PATCH 6/9] netfilter: nat: use keyed locks

2017-09-08 Thread Pablo Neira Ayuso
From: Florian Westphal no need to serialize on a single lock, we can partition the table and add/delete in parallel to different slots. This restores one of the advantages that got lost with the rhlist revert. Cc: Ivan Babrou Signed-off-by: Florian Westphal

Re: [PATCH] can: check for null sk before deferencing it via the call to sock_net

2017-09-08 Thread Oliver Hartkopp
On 09/08/2017 05:02 PM, Colin King wrote: From: Colin Ian King The assignment of net via call sock_net will dereference sk. This is performed before a sanity null check on sk, so there could be a potential null dereference on the sock_net call if sk is null. Fix

[PATCH 7/9] netfilter: core: remove erroneous warn_on

2017-09-08 Thread Pablo Neira Ayuso
From: Florian Westphal kernel test robot reported: WARNING: CPU: 0 PID: 1244 at net/netfilter/core.c:218 __nf_hook_entries_try_shrink+0x49/0xcd [..] After allowing batching in nf_unregister_net_hooks its possible that an earlier call to __nf_hook_entries_try_shrink already

[PATCH 8/9] netfilter: xt_hashlimit: alloc hashtable with right size

2017-09-08 Thread Pablo Neira Ayuso
From: Zhizhou Tian struct xt_byteslimit_htable used hlist_head, but memory allocation is done through sizeof(struct list_head). Signed-off-by: Zhizhou Tian Signed-off-by: Pablo Neira Ayuso --- net/netfilter/xt_hashlimit.c |

Re: [PATCH 0/9] Netfilter/IPVS fixes for net

2017-09-08 Thread David Miller
From: Pablo Neira Ayuso Date: Fri, 8 Sep 2017 19:45:39 +0200 > The following patchset contains Netfilter/IPVS fixes for your net tree, > they are: > > 1) Fix SCTP connection setup when IPVS module is loaded and any scheduler >is registered, from Xin Long. > > 2) Don't

RE: [PATCH RFC 3/5] Add KSZ8795 switch driver

2017-09-08 Thread Woojung.Huh
> > > > @@ -0,0 +1,2066 @@ > > > > +/* > > > > + * Microchip KSZ8795 switch driver > > > > + * > > > > + * Copyright (C) 2017 Microchip Technology Inc. > > > > + * Tristram Ha > > > > + * > > > > + * Permission to use, copy, modify, and/or distribute this software

Re: [PATCH net-next 3/3] net: phy: realtek: add RTL8201F phy-id and functions

2017-09-08 Thread Florian Fainelli
On 09/08/2017 06:02 AM, Kunihiko Hayashi wrote: > From: Jassi Brar > > Add RTL8201F phy-id and the related functions to the driver. > > The original patch is as follows: > https://patchwork.kernel.org/patch/2538341/ > > Signed-off-by: Jongsung Kim

Re: [PATCH net-next 1/3] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-09-08 Thread Florian Fainelli
On 09/08/2017 06:02 AM, Kunihiko Hayashi wrote: > DT bindings for the AVE ethernet controller found on Socionext's > UniPhier platforms. > > Signed-off-by: Kunihiko Hayashi > Signed-off-by: Jassi Brar > --- >

Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

2017-09-08 Thread Eduardo Valentin
Hello, On Fri, Sep 08, 2017 at 10:26:45AM -0700, David Miller wrote: > From: David Woodhouse > Date: Fri, 08 Sep 2017 18:23:22 +0100 > > > I don't know that anyone's ever tried saying "show me the chapter and > > verse of the documentation" > > Do you know why I brought

Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

2017-09-08 Thread Eric Dumazet
On Fri, 2017-09-08 at 11:55 -0700, Eduardo Valentin wrote: > Hello, > > On Fri, Sep 08, 2017 at 10:26:45AM -0700, David Miller wrote: > > From: David Woodhouse > > Date: Fri, 08 Sep 2017 18:23:22 +0100 > > > > > I don't know that anyone's ever tried saying "show me the

[PATCH net] tcp: fix a request socket leak

2017-09-08 Thread Eric Dumazet
From: Eric Dumazet While the cited commit fixed a possible deadlock, it added a leak of the request socket, since reqsk_put() must be called if the BPF filter decided the ACK packet must be dropped. Fixes: d624d276d1dd ("tcp: fix possible deadlock in TCP stack vs BPF

Re: [PATCH net] net: qualcomm: rmnet: Fix a double free

2017-09-08 Thread Subash Abhinov Kasiviswanathan
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c index 557c9bf1a469..0335fce54201 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c @@ -95,10 +95,8 @@

Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

2017-09-08 Thread Eduardo Valentin
David, On Tue, Aug 22, 2017 at 09:30:30PM -0700, David Miller wrote: > From: Vallish Vaidyeshwara > Date: Wed, 23 Aug 2017 00:10:25 + > > > I am submitting 2 patch series to enable hires timer to timeout > > datagram sockets (AF_UNIX & AF_INET domain) and test code to

[PATCH 2/9] netfilter: ipvs: do not create conn for ABORT packet in sctp_conn_schedule

2017-09-08 Thread Pablo Neira Ayuso
From: Xin Long There's no reason for ipvs to create a conn for an ABORT packet even if sysctl_sloppy_sctp is set. This patch is to accept it without creating a conn, just as ipvs does for tcp's RST packet. Signed-off-by: Xin Long Signed-off-by:

[PATCH 5/9] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable"

2017-09-08 Thread Pablo Neira Ayuso
From: Florian Westphal This reverts commit 870190a9ec9075205c0fa795a09fa931694a3ff1. It was not a good idea. The custom hash table was a much better fit for this purpose. A fast lookup is not essential, in fact for most cases there is no lookup at all because original tuple is

[PATCH 1/9] netfilter: ipvs: fix the issue that sctp_conn_schedule drops non-INIT packet

2017-09-08 Thread Pablo Neira Ayuso
From: Xin Long Commit 5e26b1b3abce ("ipvs: support scheduling inverse and icmp SCTP packets") changed to check packet type early. It introduced a side effect: if it's not a INIT packet, ports will be set as NULL, and the packet will be dropped later. It caused that sctp

[PATCH 3/9] netfilter: nf_nat: don't bug when mapping already exists

2017-09-08 Thread Pablo Neira Ayuso
From: Florian Westphal It seems preferrable to limp along if we have a conflicting mapping, its certainly better than a BUG(). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_nat_core.c | 4 +++- 1

[PATCH 0/9] Netfilter/IPVS fixes for net

2017-09-08 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter/IPVS fixes for your net tree, they are: 1) Fix SCTP connection setup when IPVS module is loaded and any scheduler is registered, from Xin Long. 2) Don't create a SCTP connection from SCTP ABORT packets, also from Xin Long. 3) WARN_ON()

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Andrew Lunn
> > So i would suggest one driver supporting all the different devices. > > There will be 5 drivers to support these devices: > > ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477 > ksz8795.c - KSZ8795/KSZ8795/KSZ8765 > ksz8895.c - KSZ8895/KSZ8864 > ksz8863.c - KSZ8863/KSZ8873 > ksz8463.c -

Re: [PATCH net] netlink: access nlk groups safely in netlink bind and getname

2017-09-08 Thread Cong Wang
On Tue, Sep 5, 2017 at 8:53 PM, Xin Long wrote: > Now there is no lock protecting nlk ngroups/groups' accessing in > netlink bind and getname. It's safe from nlk groups' setting in > netlink_release, but not from netlink_realloc_groups called by > netlink_setsockopt. > >

Re: [PATCH net] ipv6: fix memory leak with multiple tables during netns destruction

2017-09-08 Thread David Miller
From: Sabrina Dubroca Date: Fri, 8 Sep 2017 10:26:19 +0200 > fib6_net_exit only frees the main and local tables. If another table was > created with fib6_alloc_table, we leak it when the netns is destroyed. > > Fix this in the same way ip_fib_net_exit cleans up tables, by

Re: [PATCH net] sctp: fix missing wake ups in some situations

2017-09-08 Thread David Miller
From: Marcelo Ricardo Leitner Date: Fri, 8 Sep 2017 11:35:21 -0300 > Commit fb586f25300f ("sctp: delay calls to sk_data_ready() as much as > possible") minimized the number of wake ups that are triggered in case > the association receives a packet with multiple data

Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

2017-09-08 Thread David Miller
From: Eduardo Valentin Date: Fri, 8 Sep 2017 10:04:09 -0700 > However, this is a clear, the system call, from the net subsystem, > has changed in behavior across kernel versions. From application / > userspace perspective, changing the system call without clear > documentation

Re: Use after free in __dst_destroy_metrics_generic

2017-09-08 Thread Eric Dumazet
On Fri, 2017-09-08 at 09:10 -0700, Cong Wang wrote: > On Thu, Sep 7, 2017 at 5:52 PM, Subash Abhinov Kasiviswanathan > wrote: > > We are seeing a possible use after free in ip6_dst_destroy. > > > > It appears as if memory of the __DST_METRICS_PTR(old) was freed in some

Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

2017-09-08 Thread David Miller
From: David Woodhouse Date: Fri, 08 Sep 2017 18:23:22 +0100 > I don't know that anyone's ever tried saying "show me the chapter and > verse of the documentation" Do you know why I brought this up? Because the person I am replying to told me that the syscall documentation

Re: ipset losing entries on its own

2017-09-08 Thread Akshat Kakkar
Any more information needed?

RE: [PATCH net-next] mdio_bus: Remove unneeded gpiod NULL check

2017-09-08 Thread Woojung.Huh
> >> I think it means CONFIG_GPIOLIB=n in the kernel because it's not needed, > >> yet you run code (like drivers/net/phy/mdio_bus.c) that unconditionally > >> calls into GPIOLIB and attempts to configure a given GPIO if available. > > Yes. I'm facing issue on PC which won't need GPIOLIB as

Re: [PATCH iproute2] tc: fq: support low_rate_threshold attribute

2017-09-08 Thread Soheil Hassas Yeganeh
On Fri, Sep 8, 2017 at 5:12 PM, Eric Dumazet wrote: > From: Eric Dumazet > > TCA_FQ_LOW_RATE_THRESHOLD sch_fq attribute was added in linux-4.9 > > Tested: > > lpaa5:/tmp# tc -qd add dev eth1 root fq > lpaa5:/tmp# tc -s qd sh dev eth1 > qdisc fq 8003:

Re: [PATCH RFC 3/5] Add KSZ8795 switch driver

2017-09-08 Thread Pavel Machek
Hi! > > > + default: > > > + processed = false; > > > + break; > > > + } > > > + if (processed) > > > + *val = data; > > > +} > > > > Similar code will be needed by other drivers, right? > > Although KSZ8795 and KSZ8895 may use the same code, the other > chips will have

RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Tristram.Ha
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Friday, September 08, 2017 12:54 PM > To: Tristram Ha - C24268; muva...@gmail.com > Cc: and...@lunn.ch; pa...@ucw.cz; nathan.leigh.con...@gmail.com; > vivien.dide...@savoirfairelinux.com;

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Florian Fainelli
On 09/08/2017 01:07 PM, tristram...@microchip.com wrote: >> -Original Message- >> From: Florian Fainelli [mailto:f.faine...@gmail.com] >> Sent: Friday, September 08, 2017 12:54 PM >> To: Tristram Ha - C24268; muva...@gmail.com >> Cc: and...@lunn.ch; pa...@ucw.cz;

[PATCH iproute2 1/3] bridge: isolate vlans parsing code in a separate API

2017-09-08 Thread Roman Mashak
IFLA_BRIDGE_VLAN_INFO parsing logic will be used in link and vlan processing code, so it makes sense to move it in the separate function. Signed-off-by: Roman Mashak --- bridge/br_common.h | 1 + bridge/vlan.c | 145 +++--

[PATCH iproute2 3/3] bridge: request vlans along with link information

2017-09-08 Thread Roman Mashak
Signed-off-by: Roman Mashak --- bridge/link.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bridge/link.c b/bridge/link.c index 60200f1..9e4206f 100644 --- a/bridge/link.c +++ b/bridge/link.c @@ -461,9 +461,19 @@ static int

[PATCH iproute2 2/3] bridge: dump vlan table information for link

2017-09-08 Thread Roman Mashak
Kernel also reports vlans a port is member of, so print it. Since vlan table can be quite large, dump it only when detailed information is requested. Signed-off-by: Roman Mashak --- bridge/link.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bridge/link.c

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Pavel Machek
Hi! > There will be 5 drivers to support these devices: > > ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477 > ksz8795.c - KSZ8795/KSZ8795/KSZ8765 > ksz8895.c - KSZ8895/KSZ8864 Could we see the 8895 driver, please? > Out of topic I have a question to ask the community regarding the DSA >

Re: [net PATCH 3/3] bpf: devmap, use cond_resched instead of cpu_relax

2017-09-08 Thread Alexei Starovoitov
On 9/8/17 2:01 PM, John Fastabend wrote: Be a bit more friendly about waiting for flush bits to complete. Replace the cpu_relax() with a cond_resched(). Suggested-by: Daniel Borkmann Acked-by: Daniel Borkmann Signed-off-by: John Fastabend

[net PATCH 0/3] Fixes for XDP/BPF

2017-09-08 Thread John Fastabend
The following fixes, UAPI updates, and small improvement, i. XDP needs to be called inside RCU with preempt disabled. ii. Not strictly a bug fix but we have an attach command in the sockmap UAPI already to avoid having a single kernel released with only the attach and not the detach I'm pushing

Re: [PATCH net] netlink: fix an use-after-free issue for nlk groups

2017-09-08 Thread Cong Wang
On Tue, Sep 5, 2017 at 8:47 PM, Xin Long wrote: > ChunYu found a netlink use-after-free issue by syzkaller: > > [28448.842981] BUG: KASAN: use-after-free in __nla_put+0x37/0x40 at addr > 8807185e2378 > [28448.969918] Call Trace: > [...] > [28449.117207]

Re: [PATCH RFC 5/5] Add KSZ8795 SPI driver

2017-09-08 Thread Pavel Machek
Hi! > > Please format according to CodingStyle. (Not only this.) > > > > And this will be common for more drivers. Can it go to a header file > > and be included...? > > > > Sorry about the formatting. It seems my e-mail system needs to be checked > to make sure it does not auto-format the

[PATCH net] Revert "mdio_bus: Remove unneeded gpiod NULL check"

2017-09-08 Thread Florian Fainelli
This reverts commit 95b80bf3db03c2bf572a357cf74b9a6aefef0a4a ("mdio_bus: Remove unneeded gpiod NULL check"), this commit assumed that GPIOLIB checks for NULL descriptors, so it's safe to drop them, but it is not when CONFIG_GPIOLIB is disabled in the kernel. If we do call

[PATCH net] ipv6: fix typo in fib6_net_exit()

2017-09-08 Thread Eric Dumazet
From: Eric Dumazet IPv6 FIB should use FIB6_TABLE_HASHSZ, not FIB_TABLE_HASHSZ. Fixes: ba1cc08d9488 ("ipv6: fix memory leak with multiple tables during netns destruction") Signed-off-by: Eric Dumazet --- net/ipv6/ip6_fib.c |2 +- 1 file changed,

[net PATCH 1/3] net: rcu lock and preempt disable missing around generic xdp

2017-09-08 Thread John Fastabend
do_xdp_generic must be called inside rcu critical section with preempt disabled to ensure BPF programs are valid and per-cpu variables used for redirect operations are consistent. This patch ensures this is true and fixes the splat below. The netif_receive_skb_internal() code path is now broken

[net PATCH 3/3] bpf: devmap, use cond_resched instead of cpu_relax

2017-09-08 Thread John Fastabend
Be a bit more friendly about waiting for flush bits to complete. Replace the cpu_relax() with a cond_resched(). Suggested-by: Daniel Borkmann Acked-by: Daniel Borkmann Signed-off-by: John Fastabend --- kernel/bpf/devmap.c |

[net PATCH 2/3] bpf: add support for sockmap detach programs

2017-09-08 Thread John Fastabend
The bpf map sockmap supports adding programs via attach commands. This patch adds the detach command to keep the API symmetric and allow users to remove previously added programs. Otherwise the user would have to delete the map and re-add it to get in this state. This also adds a series of

Re: [PATCH net-next] mdio_bus: Remove unneeded gpiod NULL check

2017-09-08 Thread Florian Fainelli
On 09/07/2017 02:51 PM, woojung@microchip.com wrote: > If someone is using GPIO descriptors with GPIO disabled, i.e. calling > gpiod_get() and friends, this is very likely to be a bug, and what > the driver wants to do is: > > depends on GPIOLIB > > or > >

[PATCH iproute2] tc: fq: support low_rate_threshold attribute

2017-09-08 Thread Eric Dumazet
From: Eric Dumazet TCA_FQ_LOW_RATE_THRESHOLD sch_fq attribute was added in linux-4.9 Tested: lpaa5:/tmp# tc -qd add dev eth1 root fq lpaa5:/tmp# tc -s qd sh dev eth1 qdisc fq 8003: root refcnt 5 limit 1p flow_limit 1000p buckets 4096 \ orphan_mask 4095 bands 3 priomap

Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

2017-09-08 Thread David Miller
From: Eduardo Valentin Date: Fri, 8 Sep 2017 11:55:21 -0700 > I agree. I would prefer to understand here what is the technical > reason not to accept these patches other than "use other system > calls". I explained this, let me reiterate: And most

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Pavel Machek
On Fri 2017-09-08 21:01:22, Andrew Lunn wrote: > > > So i would suggest one driver supporting all the different devices. > > > > There will be 5 drivers to support these devices: > > > > ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477 > > ksz8795.c - KSZ8795/KSZ8795/KSZ8765 > > ksz8895.c -

[PATCH iproute2 0/3] Process IFLA_BRIDGE_VLAN_INFO tlv

2017-09-08 Thread Roman Mashak
Process IFLA_BRIDGE_VLAN_INFO attribute nested in IFLA_AF_SPEC, which contains bridge vlan table per port passed in link events. Roman Mashak (3): bridge: isolate vlans parsing code in a separate API bridge: dump vlan table information for link bridge: request vlans along with link

Re: [PATCH] ipv4: Namespaceify tcp_max_orphans knob

2017-09-08 Thread Cong Wang
On Wed, Sep 6, 2017 at 8:10 PM, Haishuang Yan wrote: > Different namespace application might require different maximal number > of TCP sockets independently of the host. So after your patch we could have N * net->ipv4.sysctl_tcp_max_orphans in a whole system,

Re: [net PATCH 2/3] bpf: add support for sockmap detach programs

2017-09-08 Thread Alexei Starovoitov
On 9/8/17 2:00 PM, John Fastabend wrote: The bpf map sockmap supports adding programs via attach commands. This patch adds the detach command to keep the API symmetric and allow users to remove previously added programs. Otherwise the user would have to delete the map and re-add it to get in

Re: [net PATCH 1/3] net: rcu lock and preempt disable missing around generic xdp

2017-09-08 Thread Alexei Starovoitov
On 9/8/17 2:00 PM, John Fastabend wrote: do_xdp_generic must be called inside rcu critical section with preempt disabled to ensure BPF programs are valid and per-cpu variables used for redirect operations are consistent. This patch ensures this is true and fixes the splat below. The

RE: [PATCH RFC 0/6] Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers.

2017-09-08 Thread Tristram.Ha
> -Original Message- > From: Pavel Machek [mailto:pa...@ucw.cz] > Sent: Friday, September 08, 2017 1:54 AM > To: Tristram Ha - C24268 > Cc: and...@lunn.ch; muva...@gmail.com; nathan.leigh.con...@gmail.com; > vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com; >

Re: [PATCH 1/2] ip_tunnel: fix setting ttl and tos value in collect_md mode

2017-09-08 Thread Alexei Starovoitov
On 9/6/17 11:08 PM, Haishuang Yan wrote: ttl and tos variables are declared and assigned, but are not used in iptunnel_xmit() function. Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel") Cc: Alexei Starovoitov Signed-off-by: Haishuang Yan

Re: [PATCH] ipv4: Namespaceify tcp_max_orphans knob

2017-09-08 Thread 严海双
> On 2017年9月9日, at 上午6:13, Cong Wang wrote: > > On Wed, Sep 6, 2017 at 8:10 PM, Haishuang Yan > wrote: >> Different namespace application might require different maximal number >> of TCP sockets independently of the host. > > So

RE: [PATCH RFC 3/5] Add KSZ8795 switch driver

2017-09-08 Thread Tristram.Ha
> -Original Message- > From: Pavel Machek [mailto:pa...@ucw.cz] > Sent: Friday, September 08, 2017 2:58 PM > To: Tristram Ha - C24268 > Cc: and...@lunn.ch; muva...@gmail.com; nathan.leigh.con...@gmail.com; > vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com; >

Re: [PATCH net] tcp: fix a request socket leak

2017-09-08 Thread David Miller
From: Alexei Starovoitov Date: Fri, 8 Sep 2017 15:59:23 -0700 > On Fri, Sep 08, 2017 at 12:44:47PM -0700, Eric Dumazet wrote: >> From: Eric Dumazet >> >> While the cited commit fixed a possible deadlock, it added a leak >> of the request

Re: [PATCH net] Revert "mdio_bus: Remove unneeded gpiod NULL check"

2017-09-08 Thread Linus Walleij
On Sat, Sep 9, 2017 at 12:38 AM, Florian Fainelli wrote: > This reverts commit 95b80bf3db03c2bf572a357cf74b9a6aefef0a4a ("mdio_bus: > Remove unneeded gpiod NULL check"), this commit assumed that GPIOLIB > checks for NULL descriptors, so it's safe to drop them, but it is not

Re: [PATCH net-next] mdio_bus: Remove unneeded gpiod NULL check

2017-09-08 Thread Linus Walleij
On Thu, Sep 7, 2017 at 11:39 PM, Florian Fainelli wrote: > I think it means CONFIG_GPIOLIB=n in the kernel because it's not needed, > yet you run code (like drivers/net/phy/mdio_bus.c) that unconditionally > calls into GPIOLIB and attempts to configure a given GPIO if

Re: [PATCH] net: bonding: Fix transmit load balancing in balance-alb mode if specified by sysfs

2017-09-08 Thread महेश बंडेवार
On Fri, Sep 8, 2017 at 7:30 AM, Nikolay Aleksandrov wrote: > On 08/09/17 17:17, Kosuke Tatsukawa wrote: >> Hi, >> >>> On 08/09/17 13:10, Nikolay Aleksandrov wrote: On 08/09/17 05:06, Kosuke Tatsukawa wrote: > Hi, > >> On 7.09.2017 01:47, Kosuke

Re: [PATCH net] ipv6: fix typo in fib6_net_exit()

2017-09-08 Thread David Miller
From: Eric Dumazet Date: Fri, 08 Sep 2017 15:48:47 -0700 > From: Eric Dumazet > > IPv6 FIB should use FIB6_TABLE_HASHSZ, not FIB_TABLE_HASHSZ. > > Fixes: ba1cc08d9488 ("ipv6: fix memory leak with multiple tables during netns > destruction") >

Re: [PATCH net] ipv6: fix typo in fib6_net_exit()

2017-09-08 Thread Sabrina Dubroca
2017-09-08, 15:48:47 -0700, Eric Dumazet wrote: > From: Eric Dumazet > > IPv6 FIB should use FIB6_TABLE_HASHSZ, not FIB_TABLE_HASHSZ. > > Fixes: ba1cc08d9488 ("ipv6: fix memory leak with multiple tables during netns > destruction") > Signed-off-by: Eric Dumazet

Re: [PATCH net] Revert "mdio_bus: Remove unneeded gpiod NULL check"

2017-09-08 Thread Linus Walleij
On Sat, Sep 9, 2017 at 1:18 AM, Florian Fainelli wrote: > On 09/08/2017 04:13 PM, Linus Walleij wrote: >> On Sat, Sep 9, 2017 at 12:38 AM, Florian Fainelli >> wrote: >> >>> This reverts commit 95b80bf3db03c2bf572a357cf74b9a6aefef0a4a ("mdio_bus: >>>

[PATCH net] bpf: make error reporting in bpf_warn_invalid_xdp_action more clear

2017-09-08 Thread Daniel Borkmann
Differ between illegal XDP action code and just driver unsupported one to provide better feedback when we throw a one-time warning here. Reason is that with 814abfabef3c ("xdp: add bpf_redirect helper function") not all drivers support the new XDP return code yet and thus they will fall into their

Re: [PATCH net] tcp: fix a request socket leak

2017-09-08 Thread Alexei Starovoitov
On Fri, Sep 08, 2017 at 12:44:47PM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > While the cited commit fixed a possible deadlock, it added a leak > of the request socket, since reqsk_put() must be called if the BPF > filter decided the ACK packet must be dropped. > >

Re: [PATCH net] Revert "mdio_bus: Remove unneeded gpiod NULL check"

2017-09-08 Thread Florian Fainelli
On 09/08/2017 04:13 PM, Linus Walleij wrote: > On Sat, Sep 9, 2017 at 12:38 AM, Florian Fainelli > wrote: > >> This reverts commit 95b80bf3db03c2bf572a357cf74b9a6aefef0a4a ("mdio_bus: >> Remove unneeded gpiod NULL check"), this commit assumed that GPIOLIB >> checks for

Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added

2017-09-08 Thread Florian Fainelli
On 09/08/2017 12:48 PM, tristram...@microchip.com wrote: >> -Original Message- >> From: Maxim Uvarov [mailto:muva...@gmail.com] >> Sent: Friday, September 08, 2017 12:00 PM >> To: Florian Fainelli >> Cc: Tristram Ha - C24268; Andrew Lunn; Pavel Machek; Nathan Conrad; Vivien >> Didelot;

Re: [PATCH net-next v8] openvswitch: enable NSH support

2017-09-08 Thread kbuild test robot
Hi Yi, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Yi-Yang/openvswitch-enable-NSH-support/20170909-124643 config: i386-randconfig-a1-201736 (attached as .config) compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904 reproduce: # save the

Re: [PATCH net v4 3/3] net: phy: sfp: rename dt properties to match the binding

2017-09-08 Thread David Miller
From: Baruch Siach Date: Thu, 7 Sep 2017 12:25:50 +0300 > Make the Rx rate select control gpio property name match the documented > binding. This would make the addition of 'rate-select1-gpios' for SFP+ > support more natural. > > Also, make the MOD-DEF0 gpio property name

Re: [PATCH net v4 2/3] dt-binding: net: sfp binding documentation

2017-09-08 Thread David Miller
From: Baruch Siach Date: Thu, 7 Sep 2017 12:25:49 +0300 > Add device-tree binding documentation SFP transceivers. Support for SFP > transceivers has been recently introduced (drivers/net/phy/sfp.c). > > Signed-off-by: Baruch Siach Applied.

Re: [PATCH net v4 1/3] dt-bindings: add SFF vendor prefix

2017-09-08 Thread David Miller
From: Baruch Siach Date: Thu, 7 Sep 2017 12:25:48 +0300 > Acked-by: Rob Herring > Signed-off-by: Baruch Siach Applied.

Re: [PATCH] net: tulip: Constify tulip_tbl

2017-09-08 Thread David Miller
From: Kees Cook Date: Thu, 7 Sep 2017 12:35:14 -0700 > It looks like all users of tulip_tbl are reads, so mark this table > as read-only. > > $ git grep tulip_tbl # edited to avoid line-wraps... > interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ... >

Re: [PATCH] drivers: net: Display proper debug level up to 6

2017-09-08 Thread David Miller
From: Mathieu Malaterre Date: Thu, 7 Sep 2017 13:24:20 +0200 > This will make it explicit some messages are of the form: > dm9000_dbg(db, 5, ... > > Signed-off-by: Mathieu Malaterre Applied.

Re: [PATCH] net: ethernet: ti: netcp_core: no need in netif_napi_del

2017-09-08 Thread David Miller
From: Ivan Khoronzhuk Date: Thu, 7 Sep 2017 18:32:30 +0300 > Don't remove rx_napi specifically just before free_netdev(), > it's supposed to be done in it and is confusing w/o tx_napi deletion. > > Signed-off-by: Ivan Khoronzhuk

Re: [V2 PATCH net-next 0/2] Fixes for XDP_REDIRECT map

2017-09-08 Thread David Miller
From: Jesper Dangaard Brouer Date: Thu, 07 Sep 2017 14:33:08 +0200 > This my V2 of catching XDP_REDIRECT and bpf_redirect_map() API usage > that can potentially crash the kernel. Addressed Daniels feedback in > patch01, and added patch02 which catch and cleanup dangling map >

Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()

2017-09-08 Thread David Miller
From: Dan Carpenter Date: Fri, 8 Sep 2017 13:31:37 +0300 > devm_ioremap_resource() never returns NULL, it only returns error > pointers so this test needs to be changed. > > Fixes: d0438bd6aa09 ("phy: add the mvebu cp110 comphy driver") > Signed-off-by: Dan Carpenter

Re: [PATCH net] bpf: make error reporting in bpf_warn_invalid_xdp_action more clear

2017-09-08 Thread David Miller
From: Daniel Borkmann Date: Sat, 9 Sep 2017 01:40:35 +0200 > Differ between illegal XDP action code and just driver > unsupported one to provide better feedback when we throw > a one-time warning here. Reason is that with 814abfabef3c > ("xdp: add bpf_redirect helper

Re: [PATCH] ipv4: Namespaceify tcp_max_orphans knob

2017-09-08 Thread Cong Wang
On Fri, Sep 8, 2017 at 6:25 PM, 严海双 wrote: > > >> On 2017年9月9日, at 上午6:13, Cong Wang wrote: >> >> On Wed, Sep 6, 2017 at 8:10 PM, Haishuang Yan >> wrote: >>> Different namespace application might

Re: [PATCH net-next 1/1] sched: Use __qdisc_drop instead of kfree_skb in sch_prio and sch_qfq

2017-09-08 Thread David Miller
From: gfree.w...@vip.163.com Date: Mon, 4 Sep 2017 14:21:12 +0800 > From: Gao Feng > > The commit 520ac30f4551 ("net_sched: drop packets after root qdisc lock > is released) made a big change of tc for performance. There are two points > left in sch_prio and sch_qfq

[GIT] Networking

2017-09-08 Thread David Miller
The iwlwifi firmware compat fix is in here as well as some other stuff: 1) Fix request socket leak introduced by BPF deadlock fix, from Eric Dumazet. 2) Fix VLAN handling with TXQs in mac80211, from Johannes Berg. 3) Missing __qdisc_drop conversions in prio and qfq schedulers, from Gao

<    1   2   3   >