[PATCH net-next v4] net: ipv4: add support for ECMP hash policy choice

2017-03-16 Thread Nikolay Aleksandrov
This patch adds support for ECMP hash policy choice via a new sysctl called fib_multipath_hash_policy and also adds support for L4 hashes. The current values for fib_multipath_hash_policy are: 0 - layer 3 (default) 1 - layer 4 If there's an skb hash already set and it matches the chosen policy

RE: [PATCH net-next] r8152: simply the arguments

2017-03-16 Thread David Laight
From: Hayes Wang > Sent: 16 March 2017 06:28 > Replace >napi with napi and tp->netdev with netdev. > > Signed-off-by: Hayes Wang > --- > drivers/net/usb/r8152.c | 44 +++- > 1 file changed, 27 insertions(+), 17 deletions(-) > >

[Patch net] bridge: resolve a false alarm of lockdep

2017-03-16 Thread Cong Wang
Andrei reported a false alarm of lockdep at net/bridge/br_fdb.c:109, this is because in Andrei's case, a spin_bug() was already triggered before this, therefore the debug_locks is turned off, lockdep_is_held() is no longer accurate after that. We should use lockdep_assert_held_once() instead of

Re: [Patch net] bridge: resolve a false alarm of lockdep

2017-03-16 Thread Nikolay Aleksandrov
On 16/03/17 19:32, Cong Wang wrote: > Andrei reported a false alarm of lockdep at net/bridge/br_fdb.c:109, > this is because in Andrei's case, a spin_bug() was already triggered > before this, therefore the debug_locks is turned off, lockdep_is_held() > is no longer accurate after that. We should

Re: [PATCH 07/17] net: convert sock.sk_refcnt from atomic_t to refcount_t

2017-03-16 Thread Kees Cook
On Thu, Mar 16, 2017 at 10:58 AM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 17:28 +0200, Elena Reshetova wrote: >> refcount_t type and corresponding API should be >> used instead of atomic_t when the variable is used as >> a reference counter. This allows to avoid

Re: [PATCH] isdn: hardware: mISDN: Remove reference to CONFIG_8xx

2017-03-16 Thread David Miller
From: Christophe Leroy Date: Thu, 16 Mar 2017 10:18:02 +0100 (CET) > CONFIG_8xx is deprecated and should soon be removed in favor > of CONFIG_PPC_8xx. > Anyway, hfc_multi_8xx.h only uses 8xx I/O ports which are > linked to the CPM1 communication processor included in the

Re: [PATCH] [PATCH net] net: Do not hold the reference for the same sk_rx_dst.

2017-03-16 Thread Kaiwen Xu
On Thu, Mar 16, 2017 at 11:45:03AM +0100, Jakub Sitnicki wrote: > On Thu, Mar 16, 2017 at 10:12 AM GMT, Kevin Xu wrote: > > Do you mean the message looping endlessly? > > No, the message is emitted just once. Around 100 seconds after > destroying a few namespaces. Occurs not so often, maybe once

Re: pull-request: mac80211 2017-03-16

2017-03-16 Thread David Miller
From: Johannes Berg Date: Thu, 16 Mar 2017 10:51:55 +0100 > Here's the pull request you were waiting for. I went through all my > pending patches but only this one is applicable for net.git at this > time, so it's just a single one. > > Since I didn't have a current

Re: [PATCH v2 net-next 4/5] sunvnet: count multicast packets

2017-03-16 Thread David Miller
From: David Laight Date: Thu, 16 Mar 2017 12:12:06 + > From: Shannon Nelson >> Sent: 16 March 2017 00:18 >> To: David Laight; netdev@vger.kernel.org; da...@davemloft.net >> On 3/15/2017 1:50 AM, David Laight wrote: >> > From: Shannon Nelson >> >> Sent: 14 March 2017

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-16 Thread Akshay Bhat
Hi Wolfgang, On 03/15/2017 05:42 AM, Wolfgang Grandegger wrote: > Hello Akshay, > ..snip.. >> >> So here is my plan: >> - Have the bus error interrupt always enabled >> - If berr-reporting off, then have the isr checks/reports state changes > > Error state change messages should always be

Re: [patch net-next v3 0/9] mlxsw: Enable VRF offload

2017-03-16 Thread David Miller
From: Jiri Pirko Date: Thu, 16 Mar 2017 09:08:11 +0100 > Packets received from netdevs enslaved to different VRF devices are > forwarded using different FIB tables. In the Spectrum ASIC this is > achieved by binding different router interfaces (RIFs) to different > virtual

Re: [PATCH v4] net: mvneta: support suspend and resume

2017-03-16 Thread David Miller
From: Jane Li Date: Thu, 16 Mar 2017 16:22:28 +0800 > Add basic support for handling suspend and resume. > > Signed-off-by: Jane Li > Reviewed-by: Jisheng Zhang > --- > Since v3: > - check clk_bus before enabling it during resume > >

Re: [PATCH net-next 1/2] tcp: remove per-destination timestamp cache

2017-03-16 Thread Lutz Vieweg
On 03/16/2017 04:40 PM, Neal Cardwell wrote: I currently wonder: What it the correct advise to an operator who needs to run one server instance that is meant to accept thousands of new, short-lived TCP connections per minute? Note that for this to be a problem there would have to be thousands

Re: [PATCH] [PATCH net] net: Do not hold the reference for the same sk_rx_dst.

2017-03-16 Thread David Miller
From: Kevin Xu Date: Thu, 16 Mar 2017 01:08:30 -0700 > In some rare cases, inet_sk_rx_dst_set() may be called multiple times > on the same dst, causing reference count leakage. Eventually, it > prevents net_device to be destroyed. The bug then manifested as > >

[net-next PATCH 4/5] net: Commonize busy polling code to focus on napi_id instead of socket

2017-03-16 Thread Alexander Duyck
From: Sridhar Samudrala Move the core functionality in sk_busy_loop() to napi_busy_loop() and make it independent of sk. This enables re-using this function in epoll busy loop implementation. Signed-off-by: Sridhar Samudrala

[net-next PATCH 5/5] epoll: Add busy poll support to epoll with socket fds.

2017-03-16 Thread Alexander Duyck
From: Sridhar Samudrala This patch adds busy poll support to epoll if all the sockets attached to an epoll fd receive packets from the same receive queue(NAPI ID). NAPI ID is maintained per epoll and is set from sk when the first event is received for a socket with a

[net-next PATCH 3/5] net: Introduce SO_INCOMING_NAPI_ID

2017-03-16 Thread Alexander Duyck
From: Sridhar Samudrala This socket option returns the napi id associated with the queue on which the last frame is received. This information can be used by the apps to split the incoming flows among the threads based on the Rx queue on which they are received.

[PATCH 14/17] net: convert inet_frag_queue.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 01/17] net: convert neighbour.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH] net: ethernet: bgmac: Allow MAC address to be specified in DTB

2017-03-16 Thread Steve Lin
Allows the BCMA version of the bgmac driver to obtain MAC address from the device tree. If no MAC address is specified there, then the previous behavior (obtaining MAC address from SPROM) is used. Signed-off-by: Steve Lin --- drivers/net/ethernet/broadcom/bgmac-bcma.c

Re: [PATCH net-next 3/3] net: stmmac: RX queue routing configuration

2017-03-16 Thread Florian Fainelli
On 03/16/2017 03:56 AM, Joao Pinto wrote: > This patch adds the configuration of RX queues' routing. > > Signed-off-by: Joao Pinto > --- > Documentation/devicetree/bindings/net/stmmac.txt | 19 ++- > drivers/net/ethernet/stmicro/stmmac/common.h | 9 >

Re: [PATCH] net: ethernet: fs_enet: Remove useless includes

2017-03-16 Thread David Miller
From: Christophe Leroy Date: Thu, 16 Mar 2017 10:18:04 +0100 (CET) > CONFIG_8xx is being deprecated. Since the includes dependent on > CONFIG_8xx are useless, just drop them. > > Signed-off-by: Christophe Leroy Applied.

[PATCH 8/9] net, ipv4: convert cipso_v4_doi.refcount from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

Re: tun offloads bug

2017-03-16 Thread Yaroslav Isakov
Hello! I'm sending new patch, with proper formatting and signed tag 2017-03-08 23:29 GMT+03:00 Yaroslav Isakov : > Hello! > I've found a bug in TUN/TAP driver with offloads - when Qemu is trying > to set offloads on tap device, there is no error, but offloads are not >

[PATCH 9/9] net, ipv4: convert fib_info.fib_clntref from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
From: Sridhar Samudrala Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if skb->napi_id is a valid value. This happens in loopback paths where skb->napi_id is not updated in rx path and holds sender_cpu that is set in xmit path.

[net-next PATCH 0/5] Add busy poll support for epoll under certain circumstances

2017-03-16 Thread Alexander Duyck
This patch series is meant to add busy polling support to epoll when all of the sockets on a given epoll are either local or are being sourced by the same NAPI ID. In order to support this the first two patches clean up a few issues we found with the NAPI ID tracking and infrastructure. In the

Re: [PATCH] net: ethernet: bgmac: Allow MAC address to be specified in DTB

2017-03-16 Thread Jon Mason
On Thu, Mar 16, 2017 at 12:39 PM, Florian Fainelli wrote: > On 03/16/2017 08:48 AM, Steve Lin wrote: >> Allows the BCMA version of the bgmac driver to obtain MAC address >> from the device tree. If no MAC address is specified there, then >> the previous behavior (obtaining

Re: [PATCH v2 net-next] r8152: simply the arguments

2017-03-16 Thread David Miller
From: Hayes Wang Date: Thu, 16 Mar 2017 14:32:22 +0800 > Replace >napi with napi and tp->netdev with netdev. > > Signed-off-by: Hayes Wang Applied.

RE: [PATCH 08/29] drivers, md: convert mddev.active from atomic_t to refcount_t

2017-03-16 Thread Reshetova, Elena
> On Tue, 2017-03-14 at 12:29 +, Reshetova, Elena wrote: > > > Elena Reshetova writes: > > > > > > > refcount_t type and corresponding API should be > > > > used instead of atomic_t when the variable is used as > > > > a reference counter. This allows to avoid

[PATCH 6/9] net, ipv6: convert xfrm6_tunnel_spi.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 1/9] net, ipv6: convert ipv6_txoptions.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 7/9] net, ipv6: convert ip6addrlbl_entry.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 5/9] net, ipv6: convert ifacaddr6.aca_refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 3/9] net, ipv6: convert inet6_ifaddr.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 4/9] net, ipv6: convert ifmcaddr6.mca_refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 2/9] net, ipv6: convert inet6_dev.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

Re: [net-next sample action optimization v2 2/4] openvswitch: Refactor recirc key allocation.

2017-03-16 Thread Pravin Shelar
On Tue, Mar 14, 2017 at 4:08 PM, Andy Zhou wrote: > The logic of allocating and copy key for each 'exec_actions_level' > was specific to execute_recirc(). However, future patches will reuse > as well. Refactor the logic into its own function clone_key(). > > Signed-off-by: Andy

[PATCH net-next] net: bcmgenet: Track per TX/RX rings statistics

2017-03-16 Thread Florian Fainelli
__bcmgenet_tx_reclaim() is currently summing TX bytes/packets in a way that is not SMP friendly, mutliples CPUs could run __bcmgenet_tx_reclaim() independently and still update stats->tx_bytes and stats->tx_packets, cloberring the other CPUs statistics. Fix this by tracking per RX and TX rings

Re: [net-next sample action optimization v2 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-16 Thread Pravin Shelar
On Tue, Mar 14, 2017 at 4:08 PM, Andy Zhou wrote: > Added execute_or_defer_actions() that both sample and recirc > action's implementation can use. > > Signed-off-by: Andy Zhou > --- > net/openvswitch/actions.c | 96 >

Re: [net-next sample action optimization v2 1/4] openvswitch: Deferred fifo API change.

2017-03-16 Thread Pravin Shelar
On Tue, Mar 14, 2017 at 4:08 PM, Andy Zhou wrote: > add_deferred_actions() API currently requires actions to be passed in > as a fully encoded netlink message. So far both 'sample' and 'recirc' > actions happens to carry actions as fully encoded netlink messages. > However, this

Re: [PATCH net-next] bpf: Detect identical PTR_TO_MAP_VALUE_OR_NULL registers

2017-03-16 Thread David Miller
From: Daniel Borkmann Date: Thu, 16 Mar 2017 11:32:31 +0100 > Do you have a chance to queue this one and it's follow-up fixes > to -stable? I checked 4.10 and they seem to have it already, but > not 4.9 kernels. > > Commits: > > 6760bf2 bpf: fix mark_reg_unknown_value

[PATCH 0/9] net, ipv4, ipv6 refcounter conversions

2017-03-16 Thread Elena Reshetova
This series, for ipv4/ipv6 components, replaces atomic_t reference counters with the new refcount_t type and API (see include/linux/refcount.h). By doing this we prevent intentional or accidental underflows or overflows that can led to use-after-free vulnerabilities. The patches are fully

[PATCH 13/17] net: convert fib_rule.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 11/17] net: convert netpoll_info.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 15/17] net: convert net.passive from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

Re: [Bug 194723] connect() to localhost stalls after 4.9 -> 4.10 upgrade

2017-03-16 Thread Stephen Hemminger
On Wed, 15 Mar 2017 15:30:17 -0700 (PDT) David Miller wrote: > From: Eric Dumazet > Date: Wed, 15 Mar 2017 14:40:34 -0700 > > > Finally time to get rid of buggy tw_recycle, that apparently some > > distros set to one. > > It's not buggy, it's

Re: [PATCH net-next v4] net: ipv4: add support for ECMP hash policy choice

2017-03-16 Thread Nikolay Aleksandrov
On 16/03/17 18:41, Stephen Hemminger wrote: > On Thu, 16 Mar 2017 15:28:00 +0200 > Nikolay Aleksandrov wrote: > >> diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c >> index d6880a6149ee..62c4f94923e5 100644 >> --- a/net/ipv4/sysctl_net_ipv4.c >>

[PATCH 05/17] net: convert sk_buff_fclones.fclone_ref from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 06/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 07/17] net: convert sock.sk_refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 16/17] net: convert netlbl_lsm_cache.refcount from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

Re: [PATCH net-next 1/2] tcp: remove per-destination timestamp cache

2017-03-16 Thread Neal Cardwell
On Thu, Mar 16, 2017 at 7:31 AM, Lutz Vieweg wrote: > > On 03/15/2017 11:55 PM, Willy Tarreau wrote: >> >> At least I can say I've seen many people enable it without understanding its >> impact, confusing it >> with tcp_tw_reuse, and copy-pasting it from random blogs and complaining

Re: [PATCH net-next V2 0/2] small set of sched cleanups

2017-03-16 Thread Cong Wang
On Thu, Mar 16, 2017 at 3:53 AM, Or Gerlitz wrote: > Hi Dave, > > Just two cleanups -- but for the 2nd one I think we need ack from > Cong Wang to make sure this isn't actually a bug report.. > > Or. > > changes from V1: > - addressed comment from Sergei to use 12 hex

Re: [PATCH] net: ethernet: bgmac: Allow MAC address to be specified in DTB

2017-03-16 Thread Florian Fainelli
On 03/16/2017 08:48 AM, Steve Lin wrote: > Allows the BCMA version of the bgmac driver to obtain MAC address > from the device tree. If no MAC address is specified there, then > the previous behavior (obtaining MAC address from SPROM) is > used. > > Signed-off-by: Steve Lin

Re: [patch net-next v3 1/9] ipv4: fib_rules: Check if rule is a default rule

2017-03-16 Thread David Ahern
On 3/16/17 2:08 AM, Jiri Pirko wrote: > From: Ido Schimmel > > Currently, when non-default (custom) FIB rules are used, devices capable > of layer 3 offloading flush their tables and let the kernel do the > forwarding instead. > > When these devices' drivers are loaded they

Re: [RFC v1 for accelerated IPoIB 04/25] IB/verb: Add ipoib_options struct and API

2017-03-16 Thread Erez Shitrit
On Mon, Mar 13, 2017 at 10:01 PM, Jason Gunthorpe wrote: > On Mon, Mar 13, 2017 at 08:31:15PM +0200, Erez Shitrit wrote: > >> diff --git a/include/rdma/ib_ipoib_accel_ops.h >> b/include/rdma/ib_ipoib_accel_ops.h >> new file mode 100644 >> index

Re: [PATCH net-next 1/2] tcp: remove per-destination timestamp cache

2017-03-16 Thread Willy Tarreau
Hi Neal, On Thu, Mar 16, 2017 at 11:40:52AM -0400, Neal Cardwell wrote: > On Thu, Mar 16, 2017 at 7:31 AM, Lutz Vieweg wrote: > > > > On 03/15/2017 11:55 PM, Willy Tarreau wrote: > >> > >> At least I can say I've seen many people enable it without understanding > >> its impact,

Re: [PATCH net-next v4] net: ipv4: add support for ECMP hash policy choice

2017-03-16 Thread Stephen Hemminger
On Thu, 16 Mar 2017 15:28:00 +0200 Nikolay Aleksandrov wrote: > diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c > index d6880a6149ee..62c4f94923e5 100644 > --- a/net/ipv4/sysctl_net_ipv4.c > +++ b/net/ipv4/sysctl_net_ipv4.c > @@ -1004,6 +1004,15

ANNOUNCE: New Platinum sponsor - Facebook

2017-03-16 Thread Jamal Hadi Salim
The organizing committee would like to welcome back a repeat platinum sponsor, Facebook! Facebook has been a great supporter of the netdev community, we thank them! cheers, jamal

[PATCH 1/1] openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD

2017-03-16 Thread Kris Murphy
Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement in ip_tun_from_nlattr in order to prevent the default case returning an error. Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area") Signed-off-by: Kris Murphy ---

[PATCH 0/1] openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD

2017-03-16 Thread Kris Murphy
Recreate and error info: Hit a new issue with OVS after updating to the Ubuntu 4.8 kernel from the Ubuntu 4.4 kernel. Iperf was used to send traffic between client VMs over VXLAN. The traffic did still flow, but every packet had to go to user space due to the flow creation failures, which

[PATCH 17/17] net: convert packet_fanout.sk_ref from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH net] rxrpc: Ignore BUSY packets on old calls

2017-03-16 Thread David Howells
If we receive a BUSY packet for a call we think we've just completed, the packet is handed off to the connection processor to deal with - but the connection processor doesn't expect a BUSY packet and so flags a protocol error. Fix this by simply ignoring the BUSY packet for the moment. The

Re: port mirror on dsa switches?

2017-03-16 Thread Florian Fainelli
Hi, On 03/16/2017 03:32 AM, Maxim Uvarov wrote: > Hello, > > Some dsa switches can support port mirror in hardware. Does somebody > have any idea how to > work with it from linux side in generic way? It has been implemented with commit f50f212749e8a28803af3628acbeb85ee0458ed5 ("net: dsa: Add

Re: [PATCH net-next 2/3] net: stmmac: TX and RX queue priority configuration

2017-03-16 Thread Florian Fainelli
On 03/16/2017 03:56 AM, Joao Pinto wrote: > This patch adds the configuration of RX and TX queues' priority. > > Signed-off-by: Joao Pinto > --- > Documentation/devicetree/bindings/net/stmmac.txt | 5 +++ > drivers/net/ethernet/stmicro/stmmac/common.h | 4 ++ >

Re: [patch net-next v3 3/9] ipv4: fib_rules: Dump FIB rules when registering FIB notifier

2017-03-16 Thread David Ahern
On 3/16/17 2:08 AM, Jiri Pirko wrote: > From: Ido Schimmel > > In commit c3852ef7f2f8 ("ipv4: fib: Replay events when registering FIB > notifier") we dumped the FIB tables and replayed the events to the > passed notification block. > > However, we merely sent a RULE_ADD

[PATCH 12/17] net: convert unix_address.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 09/17] net: convert ip_mc_list.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 10/17] net: convert in_device.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 08/17] net: convert sk_filter.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 02/17] net: convert neigh_params.refcnt from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 00/17] net subsystem refcount conversions

2017-03-16 Thread Elena Reshetova
This series, for core network subsystem components, replaces atomic_t reference counters with the new refcount_t type and API (see include/linux/refcount.h). By doing this we prevent intentional or accidental underflows or overflows that can led to use-after-free vulnerabilities. These patches

[PATCH 04/17] net: convert sk_buff.users from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 03/17] net: convert nf_bridge_info.use from atomic_t to refcount_t

2017-03-16 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

Re: [PATCH 08/17] net: convert sk_filter.refcnt from atomic_t to refcount_t

2017-03-16 Thread Daniel Borkmann
On 03/16/2017 04:28 PM, Elena Reshetova wrote: refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena

Re: [RFC v1 for accelerated IPoIB 04/25] IB/verb: Add ipoib_options struct and API

2017-03-16 Thread Jason Gunthorpe
On Thu, Mar 16, 2017 at 05:17:55PM +0200, Erez Shitrit wrote: > The QP as a part of the HW resources, it is created in the low-level > driver, and used by the upper ipoib for few reasons, (for example the > mac of the ipoib interface includes from the qp_num) > Now, if we want to use the ndo's

[PATCH v2] openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD

2017-03-16 Thread Kris Murphy
Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement in ip_tun_from_nlattr in order to prevent the default case returning an error. Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area") Signed-off-by: Kris Murphy ---

Re: [PATCH 07/17] net: convert sock.sk_refcnt from atomic_t to refcount_t

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 17:28 +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. ... >

[PATCH net-next] r8152: simply the arguments

2017-03-16 Thread Hayes Wang
Replace >napi with napi and tp->netdev with netdev. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

Re: [PATCH] nl80211: fix dumpit error path RTNL deadlocks

2017-03-16 Thread Johannes Berg
On Wed, 2017-03-15 at 14:59 -0700, David Miller wrote: > From: Johannes Berg > Date: Wed, 15 Mar 2017 14:29:13 +0100 > > > From: Johannes Berg > >  > > Sowmini pointed out Dmitry's RTNL deadlock report to me, and it > turns out > > to be

[PATCH v2 net-next] r8152: simply the arguments

2017-03-16 Thread Hayes Wang
Replace >napi with napi and tp->netdev with netdev. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 43 ++- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

[patch net-next v3 9/9] mlxsw: spectrum_router: Don't abort on l3mdev rules

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel Now that port netdevs can be enslaved to a VRF master we need to make sure the device's routing tables won't be flushed upon the insertion of a l3mdev rule. Note that we assume the notified l3mdev rule is a simple rule as used by the VRF master. We don't

[patch net-next v3 2/9] ipv4: fib_rules: Add notifier info to FIB rules notifications

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel Whenever a FIB rule is added or removed, a notification is sent in the FIB notification chain. However, listeners don't have a way to tell which rule was added or removed. This is problematic as we would like to give listeners the ability to decide which

[PATCH] [PATCH net] net: Do not hold the reference for the same sk_rx_dst.

2017-03-16 Thread Kevin Xu
In some rare cases, inet_sk_rx_dst_set() may be called multiple times on the same dst, causing reference count leakage. Eventually, it prevents net_device to be destroyed. The bug then manifested as unregister_netdevice: waiting for lo to become free. Usage count = 1 in the kernel log,

Re: [PATCH v2] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
On 03/16/2017 11:37 AM, Jisheng Zhang wrote: On Thu, 16 Mar 2017 11:19:10 +0800 Jane Li wrote: Add basic support for handling suspend and resume. Signed-off-by: Jane Li --- Since v1: - add mvneta_conf_mbus_windows() and mvneta_bm_port_init() in mvneta_resume()

Re: [PATCH v3] net: mvneta: support suspend and resume

2017-03-16 Thread Jisheng Zhang
On Thu, 16 Mar 2017 15:11:48 +0800 Jane Li wrote: > Add basic support for handling suspend and resume. > > Signed-off-by: Jane Li > --- > Since v2: > - use SIMPLE_DEV_PM_OPS instead of SET_LATE_SYSTEM_SLEEP_PM_OPS > > Since v1: > - add mvneta_conf_mbus_windows() and

[patch net-next v3 0/9] mlxsw: Enable VRF offload

2017-03-16 Thread Jiri Pirko
From: Jiri Pirko Ido says: Packets received from netdevs enslaved to different VRF devices are forwarded using different FIB tables. In the Spectrum ASIC this is achieved by binding different router interfaces (RIFs) to different virtual routers (VRs). Each RIF represents an

[patch net-next v3 5/9] mlxsw: spectrum_router: Associate RIFs with correct VR

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel When a router interface (RIF) is created due to a netdev being enslaved to a VRF master, then it should be associated with the appropriate virtual router (VR) and not the default one. If netdev is a VRF slave, lookup the VR based on the VRF's table ID.

[patch net-next v3 1/9] ipv4: fib_rules: Check if rule is a default rule

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel Currently, when non-default (custom) FIB rules are used, devices capable of layer 3 offloading flush their tables and let the kernel do the forwarding instead. When these devices' drivers are loaded they register to the FIB notification chain, which lets

[patch net-next v3 7/9] mlxsw: spectrum_router: Add support for VRFs

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel Allow port netdevs, LAG and VLAN devices stacked on top of these to be enslaved to a VRF master device. Upon enslavement, create a router interface (RIF) for the enslaved netdev and associate it with a virtual router (VR) based on the VRF's table ID. If

[patch net-next v3 6/9] mlxsw: spectrum_router: Don't destroy RIF if L3 slave

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel We usually destroy the netdev's router interface (RIF) when the last IP address is removed from it. However, we shouldn't do that if it's enslaved to an L3 master device. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko

[patch net-next v3 8/9] mlxsw: spectrum_router: Add support for VRFs on top of bridges

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel In a similar fashion to the previous patch, allow bridges and VLAN devices on top of bridges to be enslaved to a VRF master device. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko ---

[patch net-next v3 3/9] ipv4: fib_rules: Dump FIB rules when registering FIB notifier

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel In commit c3852ef7f2f8 ("ipv4: fib: Replay events when registering FIB notifier") we dumped the FIB tables and replayed the events to the passed notification block. However, we merely sent a RULE_ADD notification in case custom rules were in use. As

[patch net-next v3 4/9] net: vrf: Set slave's private flag before linking

2017-03-16 Thread Jiri Pirko
From: Ido Schimmel Allow listeners of the subsequent CHANGEUPPER notification to retrieve the VRF's table ID by calling l3mdev_fib_table() with the slave netdev. Without this change, the netdev won't be considered an L3 slave and the function would return 0. This is

[PATCH] isdn: hardware: mISDN: Remove reference to CONFIG_8xx

2017-03-16 Thread Christophe Leroy
CONFIG_8xx is deprecated and should soon be removed in favor of CONFIG_PPC_8xx. Anyway, hfc_multi_8xx.h only uses 8xx I/O ports which are linked to the CPM1 communication processor included in the 8xx rather than the 8xx itself. This patch therefore makes it dependent on CONFIG_CPM1 instead, like

Re: [PATCH-v5 0/4] vsock: cancel connect packets when failing to connect

2017-03-16 Thread Stefan Hajnoczi
On Wed, Mar 15, 2017 at 09:32:13AM +0800, Peng Tao wrote: > Currently, if a connect call fails on a signal or timeout (e.g., guest is > still > in the process of starting up), we'll just return to caller and leave the > connect > packet queued and they are sent even though the connection is

[PATCH net-next 2/2] net/sched: fq_codel: Avoid set-but-unused variable

2017-03-16 Thread Or Gerlitz
The code introduced by commit 2f5fb "net_sched: update hierarchical backlog too" only sets prev_backlog in fq_codel_dequeue() but not using that anywhere, remove that setting. Cc: Cong Wang Signed-off-by: Or Gerlitz ---

[PATCH net-next 0/2] small set of sched cleanups

2017-03-16 Thread Or Gerlitz
Hi Dave, Just two cleanups -- but for the 2nd one I think we need ack from Cong Wang to make sure this isn't actually a bug report.. Or. Or Gerlitz (2): net/sched: act_ife: Staticfy find_decode_metaid() net/sched: fq_codel: Avoid set-but-unused variable net/sched/act_ife.c | 4 ++--

[PATCH net-next 1/2] net/sched: act_ife: Staticfy find_decode_metaid()

2017-03-16 Thread Or Gerlitz
As it's used only on that file. Signed-off-by: Or Gerlitz --- net/sched/act_ife.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c index 71e7ff22..c75ea5c 100644 --- a/net/sched/act_ife.c +++

  1   2   3   >