RE: [PATCH net v4 00/12] Fix possbile memleaks when fail to register_netdevice

2017-05-07 Thread Gao Feng
Hi David, > From: David Miller [mailto:da...@davemloft.net] > From: gfree.w...@foxmail.com > Date: Tue, 2 May 2017 13:58:42 +0800 > > > These following drivers allocate kinds of resources in its ndo_init > > func, free some of them or all in the destructor func. Then there is > > one memleak

[PATCH net] ipv6: make sure dev is not NULL before call ip6_frag_reasm

2017-05-07 Thread Hangbin Liu
Since ip6_frag_reasm() will call __in6_dev_get(dev), which will access dev->ip6_ptr. We need to make sure dev is not NULL. Signed-off-by: Hangbin Liu --- net/ipv6/reassembly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/reassembly.c

RE: FEC on i.MX 7 transmit queue timeout

2017-05-07 Thread Andy Duan
From: Andrew Lunn Sent: Friday, May 05, 2017 8:24 PM >To: Andy Duan >Cc: Stefan Agner ; feste...@gmail.com; >netdev@vger.kernel.org; netdev-ow...@vger.kernel.org >Subject: Re: FEC on i.MX 7 transmit queue timeout > >> No, it is not

Re: [PATCH v4 net-next 08/10] net/ncsi: Support NCSI packet generation

2017-05-07 Thread Andrew Lunn
> I need to dig how libpcap receives packets. It's appreciated if you > can give some hints about that. However, I don't see the benefit to > receive packets by libpcap, could you claim? The base interface should already be doing it for you. Try it! Run tcpdump or wireshark and you should see the

Re: [PATCH v4 net-next 08/10] net/ncsi: Support NCSI packet generation

2017-05-07 Thread Gavin Shan
On Thu, May 04, 2017 at 02:00:35PM +0200, Andrew Lunn wrote: >On Thu, May 04, 2017 at 04:31:57PM +1000, Gavin Shan wrote: >> On Wed, May 03, 2017 at 02:52:54PM +0200, Andrew Lunn wrote: >> >On Wed, May 03, 2017 at 02:44:39PM +1000, Gavin Shan wrote: >> >> This introduces

Re: [PATCH v4 net-next 04/10] net/ncsi: Ethtool operation to get NCSI topology

2017-05-07 Thread Gavin Shan
On Thu, May 04, 2017 at 09:31:20AM +, David Laight wrote: >From: Gavin Shan >> Sent: 04 May 2017 07:16 >> On Wed, May 03, 2017 at 10:19:44PM -0700, Stephen Hemminger wrote: >> >On Wed, 3 May 2017 14:44:35 +1000 >> >Gavin Shan wrote: >... >> >> +{ >> >> + struct

Re: [PATCH net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-07 Thread Andrew Lunn
On Sun, May 07, 2017 at 01:02:31AM +, woojung@microchip.com wrote: > >> +}, { > >> + .phy_id = PHY_ID_KSZ9477, > >> + .phy_id_mask= MICREL_PHY_ID_MASK, > >> + .name = "Microchip KSZ9477", > >> + .features = PHY_GBIT_FEATURES, > >> + .flags

Re: [PATCH] net: dsa: loop: Check for memory allocation failure

2017-05-07 Thread Florian Fainelli
Le 05/05/17 à 22:29, Christophe JAILLET a écrit : > If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. > Return -ENOMEM instead, as done for some other memory allocation just a > few lines above. > > Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver") > > Signed-off-by: Christophe

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-07 Thread Jann Horn
On Mon, May 8, 2017 at 12:51 AM, Daniel Borkmann wrote: > On 05/08/2017 12:26 AM, Jann Horn wrote: >> >> On Mon, May 8, 2017 at 12:04 AM, Daniel Borkmann >> wrote: >>> >>> The patch fixes two things at once: >>> >>> 1) It checks the

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-07 Thread Daniel Borkmann
On 05/08/2017 12:26 AM, Jann Horn wrote: On Mon, May 8, 2017 at 12:04 AM, Daniel Borkmann wrote: The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just

Re: [PATCH iproute2] tc: bpf: add ppc64 and sparc64 to list of archs with eBPF support

2017-05-07 Thread David Miller
From: Alexander Alemayhu Date: Sat, 6 May 2017 22:30:10 +0200 > sparc64 support was added in 7a12b5031c6b (sparc64: Add eBPF JIT., > 2017-04-17)[0] > and ppc64 in 156d0e290e96 (powerpc/ebpf/jit: Implement JIT compiler for > extended BPF, 2016-06-22)[1]. > > [0]: >

[PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-07 Thread Daniel Borkmann
The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just dumps 0 as we would when kptr_restrict is enabled on %pK. Given the latter is off by default and not every distro

Re: [PATCH iproute2] tc: bpf: add ppc64 and sparc64 to list of archs with eBPF support

2017-05-07 Thread Daniel Borkmann
On 05/06/2017 10:30 PM, Alexander Alemayhu wrote: sparc64 support was added in 7a12b5031c6b (sparc64: Add eBPF JIT., 2017-04-17)[0] and ppc64 in 156d0e290e96 (powerpc/ebpf/jit: Implement JIT compiler for extended BPF, 2016-06-22)[1]. [0]:

RE: [PATCH net-next 4/5] dsa: Microchip KSZ switches SPI devicetree configuration

2017-05-07 Thread Woojung.Huh
Hi Sergei >> + spi1: spi@f8008000 { >> + pinctrl-0 = <_spi_ksz>; >> + cs-gpios = < 25 0>; >> + id = <1>; >> + status = "okay"; > >4 lines above should be indented more to the right. >> + }; >> + }; > >

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-07 Thread Jann Horn
On Mon, May 8, 2017 at 12:04 AM, Daniel Borkmann wrote: > The patch fixes two things at once: > > 1) It checks the env->allow_ptr_leaks and only prints the map address to >the log if we have the privileges to do so, otherwise it just dumps 0 >as we would when

Re: [PATCH net v4 00/12] Fix possbile memleaks when fail to register_netdevice

2017-05-07 Thread David Miller
From: gfree.w...@foxmail.com Date: Tue, 2 May 2017 13:58:42 +0800 > These following drivers allocate kinds of resources in its ndo_init > func, free some of them or all in the destructor func. Then there is > one memleak that some errors happen after register_netdevice invokes > the ndo_init

RE: [PATCH net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-07 Thread Woojung.Huh
>> +}, { >> + .phy_id = PHY_ID_KSZ9477, >> + .phy_id_mask= MICREL_PHY_ID_MASK, >> + .name = "Microchip KSZ9477", >> + .features = PHY_GBIT_FEATURES, >> + .flags = PHY_HAS_MAGICANEG, > >Is this magic still used anywhere? I could not find

Re: [RFC iproute2 0/8] RDMA tool

2017-05-07 Thread Stephen Hemminger
On Sun, 7 May 2017 09:33:29 +0300 Leon Romanovsky wrote: > On Sat, May 06, 2017 at 12:48:26PM +0200, Jiri Pirko wrote: > > Fri, May 05, 2017 at 03:17:54PM CEST, l...@kernel.org wrote: > > >On Fri, May 05, 2017 at 08:54:57AM +0200, Jiri Benc wrote: > > >> On Thu, 4 May 2017

Re: [RFC iproute2 0/8] RDMA tool

2017-05-07 Thread Leon Romanovsky
On Sat, May 06, 2017 at 12:48:26PM +0200, Jiri Pirko wrote: > Fri, May 05, 2017 at 03:17:54PM CEST, l...@kernel.org wrote: > >On Fri, May 05, 2017 at 08:54:57AM +0200, Jiri Benc wrote: > >> On Thu, 4 May 2017 21:02:08 +0300, Leon Romanovsky wrote: > >> > In order to close object model, ensure

Re: [RFC iproute2 0/8] RDMA tool

2017-05-07 Thread Leon Romanovsky
On Sat, May 06, 2017 at 02:40:24PM +, Bart Van Assche wrote: > On Sat, 2017-05-06 at 12:40 +0200, Jiri Pirko wrote: > > Thu, May 04, 2017 at 08:10:54PM CEST, bart.vanass...@sandisk.com wrote: > > > On Thu, 2017-05-04 at 21:02 +0300, Leon Romanovsky wrote: > > > > Following our discussion both

Re: [Patch net] ipv4: restore rt->fi for reference counting

2017-05-07 Thread Eric Dumazet
On Thu, 2017-05-04 at 14:54 -0700, Cong Wang wrote: > IPv4 dst could use fi->fib_metrics to store metrics but fib_info > itself is refcnt'ed, so without taking a refcnt fi and > fi->fib_metrics could be freed while dst metrics still points to > it. This triggers use-after-free as reported by

[PATCH net v2] Check for skb_put_padto return value

2017-05-07 Thread Peter Heise
Return value of skb_put_padto is now checked as reported by Dan Carpenter. skb might be freed in case of error in skb_put_padto. --- net/hsr/hsr_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index

Re: [PATCH iproute2 v2 1/1] vxlan: Add support for modifying vxlan device attributes

2017-05-07 Thread Roman Mashak
Girish Moodalbail writes: [...] > ip/iplink_vxlan.c | 251 > +++--- > 1 file changed, 143 insertions(+), 108 deletions(-) > > diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c > index b4ebb13..2bd619d 100644 > ---

Re: [RFC iproute2 0/8] RDMA tool

2017-05-07 Thread Jiri Pirko
Sat, May 06, 2017 at 04:40:24PM CEST, bart.vanass...@sandisk.com wrote: >On Sat, 2017-05-06 at 12:40 +0200, Jiri Pirko wrote: >> Thu, May 04, 2017 at 08:10:54PM CEST, bart.vanass...@sandisk.com wrote: >> > On Thu, 2017-05-04 at 21:02 +0300, Leon Romanovsky wrote: >> > > Following our discussion

Re: [PATCH net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-07 Thread Florian Fainelli
Hi Woojung, Le 05/05/17 à 16:18, woojung@microchip.com a écrit : > From: Woojung Huh > > The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch > with numerous advanced features. 5 ports incorporate > 10/100/1000 Mbps PHYs. The other 2 ports have