Re: [PATCH net] sctp: fix an use-after-free issue in sctp_sock_dump

2017-09-15 Thread Neil Horman
On Fri, Sep 15, 2017 at 11:02:21AM +0800, Xin Long wrote: > Commit 86fdb3448cc1 ("sctp: ensure ep is not destroyed before doing the > dump") tried to fix an use-after-free issue by checking !sctp_sk(sk)->ep > with holding sock and sock lock. > > But Paolo noticed that endpoint could be destroyed

[PATCH net] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-15 Thread Sabrina Dubroca
The tunnel is currently removed from the list during destruction. This can lead to a double-free of the struct sock if we try to delete the tunnel twice fast enough. The first delete operation does a lookup (l2tp_tunnel_get), finds the tunnel, calls l2tp_tunnel_delete, which queues it for

Re: [PATCH net] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-15 Thread Tom Parkin
On Fri, Sep 15, 2017 at 11:08:07AM +0200, Sabrina Dubroca wrote: > The tunnel is currently removed from the list during destruction. This > can lead to a double-free of the struct sock if we try to delete the tunnel > twice fast enough. > > The first delete operation does a lookup

Re: [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err

2017-09-15 Thread Marcelo Ricardo Leitner
On Fri, Sep 15, 2017 at 11:02:48AM +0800, Xin Long wrote: > sctp_diag would not actually dump out sk/asoc if inet_sctp_diag_fill > returns err, in which case it shouldn't mark sk dumped by setting > cb->args[3] as 1 in sctp_sock_dump(). > > Otherwise, it could cause some asocs to have no parent's

Re: [PATCH net] sctp: fix an use-after-free issue in sctp_sock_dump

2017-09-15 Thread Marcelo Ricardo Leitner
On Fri, Sep 15, 2017 at 11:02:21AM +0800, Xin Long wrote: > Commit 86fdb3448cc1 ("sctp: ensure ep is not destroyed before doing the > dump") tried to fix an use-after-free issue by checking !sctp_sk(sk)->ep > with holding sock and sock lock. > > But Paolo noticed that endpoint could be destroyed

Re: RFC: Audit Kernel Container IDs

2017-09-15 Thread Richard Guy Briggs
On 2017-09-14 01:30, Richard Guy Briggs wrote: > On 2017-09-13 14:33, Carlos O'Donell wrote: > > On 09/13/2017 12:13 PM, Richard Guy Briggs wrote: > > > Containers are a userspace concept. The kernel knows nothing of them. > > > > I am looking at this RFC from a userspace perspective,

Re: [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err

2017-09-15 Thread Neil Horman
On Fri, Sep 15, 2017 at 11:02:48AM +0800, Xin Long wrote: > sctp_diag would not actually dump out sk/asoc if inet_sctp_diag_fill > returns err, in which case it shouldn't mark sk dumped by setting > cb->args[3] as 1 in sctp_sock_dump(). > > Otherwise, it could cause some asocs to have no parent's

Re: Page allocator bottleneck

2017-09-15 Thread Mel Gorman
On Thu, Sep 14, 2017 at 07:49:31PM +0300, Tariq Toukan wrote: > Insights: > Major degradation between #1 and #2, not getting any close to linerate! > Degradation is fixed between #2 and #3. > This is because page allocator cannot stand the higher allocation rate. > In #2, we also see that the

Re: feature request for kernel module 8021q

2017-09-15 Thread Pierre Colombier
One interesting feature would be to have a special vlan number (let's say 0 or -1 or 4097 ) designed so that it gets all the untagged trafic and only the untagged trafic. 4097 is not a valid number nor is -1 since that closely follows what the VLAN ID extracted from the tag would be. VLAN 0

Re: [PATCH net] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-15 Thread Sabrina Dubroca
2017-09-15, 10:42:59 +0100, Tom Parkin wrote: > On Fri, Sep 15, 2017 at 11:08:07AM +0200, Sabrina Dubroca wrote: > > The tunnel is currently removed from the list during destruction. This > > can lead to a double-free of the struct sock if we try to delete the tunnel > > twice fast enough. > > >

Re: [PATCH net] bpf/verifier: reject BPF_ALU64|BPF_END

2017-09-15 Thread Alexei Starovoitov
On Fri, Sep 15, 2017 at 02:37:38PM +0100, Edward Cree wrote: > Neither ___bpf_prog_run nor the JITs accept it. > Also adds a new test case. > > Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") > Signed-off-by: Edward Cree Good catch. Thanks! Acked-by: Alexei

Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13

2017-09-15 Thread Larry Finger
On 09/15/2017 05:10 AM, Zwindl wrote: Original Message Subject: Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13 Local Time: 14 September 2017 6:05 PM UTC Time: 14 September 2017 18:05 From: larry.fin...@lwfinger.net To: Zwindl ,

Re: selftests/bpf doesn't compile

2017-09-15 Thread Alexei Starovoitov
On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: > Hi Alexei and Daniel, > > bpf test depends on clang and fails to compile when > > -- > make -C tools/testing/selftests/bpf run_tests > > > make: clang: Command not found >

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-15 Thread Andrew Lunn
> Could you put together your requirements so we can work it out to extend > devlink to support them? As i've said multiple times, generic two dimensional tables. Examples could look like: Stats cpu lan0 lan1 lan2 lan3 lan4dsa

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-15 Thread Jiri Pirko
Fri, Sep 15, 2017 at 04:08:39PM CEST, and...@lunn.ch wrote: >> Could you put together your requirements so we can work it out to extend >> devlink to support them? > >As i've said multiple times, generic two dimensional tables. Examples >could look like: > >Stats cpu lan0

Re: [PATCH] net: phy: Fix mask value write on gmii2rgmii converter speed register.

2017-09-15 Thread Andrew Lunn
> Can you please point me to that email? I assume you can search the email lists just as well as i can. Andrew

[patch net] mlxsw: spectrum_router: Only handle IPv4 and IPv6 events

2017-09-15 Thread Jiri Pirko
From: Ido Schimmel The driver doesn't support events from address families other than IPv4 and IPv6, so ignore them. Otherwise, we risk queueing a work item before it's initialized. This can happen in case a VRF is configured when MROUTE_MULTIPLE_TABLES is enabled, as the

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-15 Thread Andrew Lunn
> > Reg cpu lan0lan1lan2lan3lan4lan5 global0 global1 > >- > >00: 4e07 4d044d044d044d044d044d04 0 > >01: 403e 003d003d003d003d003d

Re: [REGRESSION] Warning in tcp_fastretrans_alert() of net/ipv4/tcp_input.c

2017-09-15 Thread Neal Cardwell
On Fri, Sep 15, 2017 at 1:03 AM, Oleksandr Natalenko wrote: > Hi. > > I've applied your test patch but it doesn't fix the issue for me since the > warning is still there. > > Were you able to reproduce it? Hi, Thanks for testing that. That is a very useful data point.

[PATCH net] bpf/verifier: reject BPF_ALU64|BPF_END

2017-09-15 Thread Edward Cree
Neither ___bpf_prog_run nor the JITs accept it. Also adds a new test case. Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") Signed-off-by: Edward Cree --- kernel/bpf/verifier.c | 3 ++- tools/testing/selftests/bpf/test_verifier.c | 16

Re: [PATCH net] packet: hold bind lock when rebinding to fanout hook

2017-09-15 Thread Willem de Bruijn
On Thu, Sep 14, 2017 at 5:14 PM, Willem de Bruijn wrote: > Packet socket bind operations must hold the po->bind_lock. This keeps > po->running consistent with whether the socket is actually on a ptype > list to receive packets. > > fanout_add unbinds a socket and its

[PATCH] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
Write assignment statement outside the if statement. Done using the following semantic patch by coccinelle. @@ identifier E; expression F; statement S; @@ -if((E = F)) +E = F +if(E) S Signed-off-by: Srishti Sharma --- drivers/staging/irda/drivers/irda-usb.c | 4 ++--

Re: [Outreachy kernel] [PATCH] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 1:08 AM, Julia Lawall wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> Write assignment statement outside the if statement. Done using >> the following semantic patch by coccinelle. >> >> @@ >> identifier E; >> expression F; >> statement

[PATCH v2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
Write assignment statement outside the if statement. Done using the following semantic patch by coccinelle. @@ identifier E; expression F; statement S; @@ -if((E = F)) +E = F; +if(E) S Signed-off-by: Srishti Sharma --- Changes in v2: -Semicolon was missing in one of

Re: selftests/bpf doesn't compile

2017-09-15 Thread Edward Cree
On 15/09/17 17:02, Alexei Starovoitov wrote: > On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: >> Is bpf test intended to be run in kselftest run? The clang dependency might >> not be met on majority of the systems. Is this a hard dependency?? > It is a hard dependency and clang should

Re: scheduling while atomic from vmci_transport_recv_stream_cb in 3.16 kernels

2017-09-15 Thread Ben Hutchings
On Thu, 2017-09-14 at 10:59 +0200, Michal Hocko wrote: > On Wed 13-09-17 18:58:13, Jorgen S. Hansen wrote: > [...] > > The patch series look good to me. > > Thanks for double checking. Ben, could you merge this to 3.16 stable > branch, please? I have a long list of requests to work through, but

Re: [PATCH] net/packet: fix race condition between fanout_add and __unregister_prot_hook

2017-09-15 Thread Willem de Bruijn
On Fri, Sep 15, 2017 at 1:41 PM, Cong Wang wrote: > On Thu, Sep 14, 2017 at 7:35 AM, Willem de Bruijn > wrote: >> On Thu, Sep 14, 2017 at 10:07 AM, nixiaoming wrote: >>> From: l00219569 >>>

Re: [PATCH net] bpf/verifier: reject BPF_ALU64|BPF_END

2017-09-15 Thread Daniel Borkmann
On 09/15/2017 03:37 PM, Edward Cree wrote: Neither ___bpf_prog_run nor the JITs accept it. Also adds a new test case. Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") Signed-off-by: Edward Cree Acked-by: Daniel Borkmann

Re: selftests/bpf doesn't compile

2017-09-15 Thread Daniel Borkmann
On 09/15/2017 08:23 PM, Daniel Borkmann wrote: On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote: On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: Is bpf test intended to be

Re: Regression in throughput between kvm guests over virtual bridge

2017-09-15 Thread Matthew Rosato
> It looks like vhost is slowed down for some reason which leads to more > idle time on 4.13+VHOST_RX_BATCH=1. Appreciated if you can collect the > perf.diff on host, one for rx and one for tx. > perf data below for the associated vhost threads, baseline=4.12, delta1=4.13,

Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13

2017-09-15 Thread Larry Finger
On 09/15/2017 12:12 PM, Zwindl wrote: Thanks for your patient and advice, I'll keep that in mind. I do want help, and I got 1 day to build the system, but I can't recall how to compile it, The last time I compile kernel is 2013, so, maybe I'll ask you so many stupid questions during the build

Re: [PATCH] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 1:03 AM, Srishti Sharma wrote: > Write assignment statement outside the if statement. Done using > the following semantic patch by coccinelle. > > @@ > identifier E; > expression F; > statement S; > @@ > > -if((E = F)) > +E = F > +if(E) > S > >

[PATCH net-next v1] bridge: also trigger RTM_NEWLINK when interface is released from bridge

2017-09-15 Thread Vincent Bernat
Currently, when an interface is released from a bridge, we get a RTM_DELLINK event through netlink: Deleted 2: dummy0: mtu 1500 master bridge0 state UNKNOWN link/ether 6e:23:c2:54:3a:b3 Userspace has to interpret that as a removal from the bridge, not as a

Re: [Outreachy kernel] [PATCH v2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Julia Lawall
On Sat, 16 Sep 2017, Srishti Sharma wrote: > Write assignment statement outside the if statement. Done using > the following semantic patch by coccinelle. > > @@ > identifier E; > expression F; > statement S; > @@ > > -if((E = F)) > +E = F; > +if(E) > S > > Signed-off-by: Srishti Sharma

Re: [PATCH net] packet: hold bind lock when rebinding to fanout hook

2017-09-15 Thread Willem de Bruijn
>> diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c >> index c26172995511..d288f52c53f7 100644 >> --- a/net/packet/af_packet.c >> +++ b/net/packet/af_packet.c >> @@ -1684,10 +1684,6 @@ static int fanout_add(struct sock *sk, u16 id, u16 >> type_flags) >> >> mutex_lock(_mutex);

Re: [REGRESSION] Warning in tcp_fastretrans_alert() of net/ipv4/tcp_input.c

2017-09-15 Thread Oleksandr Natalenko
Hello. With net.ipv4.tcp_fack set to 0 the warning still appears: === » sysctl net.ipv4.tcp_fack net.ipv4.tcp_fack = 0 » LC_TIME=C dmesg -T | grep WARNING [Fri Sep 15 20:40:30 2017] WARNING: CPU: 1 PID: 711 at net/ipv4/tcp_input.c: 2826 tcp_fastretrans_alert+0x7c8/0x990 [Fri Sep 15

Re: [Outreachy kernel] [PATCH] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Julia Lawall
On Sat, 16 Sep 2017, Srishti Sharma wrote: > Write assignment statement outside the if statement. Done using > the following semantic patch by coccinelle. > > @@ > identifier E; > expression F; > statement S; > @@ > > -if((E = F)) > +E = F The line above would need to end in a ; This ends up

Re: selftests/bpf doesn't compile

2017-09-15 Thread Shuah Khan
On 09/15/2017 10:02 AM, Alexei Starovoitov wrote: > On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: >> Hi Alexei and Daniel, >> >> bpf test depends on clang and fails to compile when >> >> -- >> make -C tools/testing/selftests/bpf

Re: [PATCH] net/packet: fix race condition between fanout_add and __unregister_prot_hook

2017-09-15 Thread Cong Wang
On Thu, Sep 14, 2017 at 7:35 AM, Willem de Bruijn wrote: > On Thu, Sep 14, 2017 at 10:07 AM, nixiaoming wrote: >> From: l00219569 >> >> If fanout_add is preempted after running po-> fanout = match >> and before running

Re: [PATCH] net/packet: fix race condition between fanout_add and __unregister_prot_hook

2017-09-15 Thread Cong Wang
On Fri, Sep 15, 2017 at 10:46 AM, Willem de Bruijn wrote: > > In case of failure we also need to unlink and free match. I > sent the following: > > http://patchwork.ozlabs.org/patch/813945/ Ah, will take a look.

Re: [PATCH net] packet: hold bind lock when rebinding to fanout hook

2017-09-15 Thread Cong Wang
On Thu, Sep 14, 2017 at 2:14 PM, Willem de Bruijn wrote: > Packet socket bind operations must hold the po->bind_lock. This keeps > po->running consistent with whether the socket is actually on a ptype > list to receive packets. > > fanout_add unbinds a socket and its

[no subject]

2017-09-15 Thread noreply
<>

Re: selftests/bpf doesn't compile

2017-09-15 Thread Alexei Starovoitov
On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: > On 15/09/17 17:02, Alexei Starovoitov wrote: > > On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: > >> Is bpf test intended to be run in kselftest run? The clang dependency might > >> not be met on majority of the systems.

Re: selftests/bpf doesn't compile

2017-09-15 Thread Daniel Borkmann
On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote: On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: Is bpf test intended to be run in kselftest run? The clang dependency might

Re: selftests/bpf doesn't compile

2017-09-15 Thread Shuah Khan
On 09/15/2017 11:00 AM, Shuah Khan wrote: > On 09/15/2017 10:02 AM, Alexei Starovoitov wrote: >> On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: >>> Hi Alexei and Daniel, >>> >>> bpf test depends on clang and fails to compile when >>> >>>

Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression

2017-09-15 Thread Josef Bacik
Finally got access to a box to run this down myself. This patch on top of the other patches fixes the problem for me, could you verify it works for you? Thanks, Josef On 9/13/17, 3:49 PM, "Cole Robinson" wrote: On 09/13/2017 03:44 PM, Josef Bacik wrote: > Alright

Re: selftests/bpf doesn't compile

2017-09-15 Thread Alexei Starovoitov
On Fri, Sep 15, 2017 at 11:00:31AM -0600, Shuah Khan wrote: > >> I could add a special target for bpf TARGET_BPF perhaps and exclude it from > >> the run_test> > > I'm not sure what was the motivation to exclude hotplug from default > > testing, > > These are considered a bit more disruptive

[PATCH net] net: phy: Fix mask value write on gmii2rgmii converter speed register

2017-09-15 Thread Fahad Kunnathadi
To clear Speed Selection in MDIO control register(0x10), ie, clear bits 6 and 13 to zero while keeping other bits same. Before AND operation,The Mask value has to be perform with bitwise NOT operation (ie, ~ operator) This patch clears current speed selection before writing the new speed settings

[PATCH net] ip6_tunnel: do not allow loading ip6_tunnel if ipv6 is disabled in cmdline

2017-09-15 Thread Xin Long
If ipv6 has been disabled from cmdline since kernel started, it makes no sense to allow users to create any ip6 tunnel. Otherwise, it could some potential problem. Jianlin found a kernel crash caused by this in ip6_gre when he set ipv6.disable=1 in grub: [ 209.588865] Unable to handle kernel

Re: Regression in throughput between kvm guests over virtual bridge

2017-09-15 Thread Jason Wang
On 2017年09月15日 11:36, Matthew Rosato wrote: Is the issue gone if you reduce VHOST_RX_BATCH to 1? And it would be also helpful to collect perf diff to see if anything interesting. (Consider 4.4 shows more obvious regression, please use 4.4). Issue still exists when I force VHOST_RX_BATCH = 1

Re: [PATCH] net: phy: Fix mask value write on gmii2rgmii converter speed register.

2017-09-15 Thread Michal Simek
On 14.9.2017 16:34, Andrew Lunn wrote: > On Thu, Sep 14, 2017 at 12:46:31PM +0530, Fahad Kunnathadi wrote: >> To clear Speed Selection in MDIO control register(0x10), >> ie, clear bits 6 and 13 to zero while keeping other bits same. >> Before AND operation,The Mask value has to be perform with

Re: [PATCH] net: phy: Fix mask value write on gmii2rgmii converter speed register.

2017-09-15 Thread Fahad Kunnathadi
Hi Andrew, Thank you for review and comments. I will review this driver code with any review comments before, and update you if I could find any.. Best Regards Fahad K - Original Message - From: "Andrew Lunn" To: "Fahad Kunnathadi"

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-15 Thread Egil Hjelmeland
On 15. sep. 2017 07:51, Jiri Pirko wrote: > Thu, Sep 14, 2017 at 11:01:32PM CEST, and...@lunn.ch wrote: >>> Can you clarify what type of registers it is you are wanting to read? >>> We already have ethtool which is meant to allow reading the device >>> registers for a given netdev. As long as the

Job Offer In USA

2017-09-15 Thread Valero Energy Recruitment
Valero Energy Oil & Gas Company USA Employment Opportunity in Texas, USA. Oil & Gas Sector ( NEW PLANT RIG ) Salary Range $7,000 USD - $11,700 Per Month Kindly send your CV/RESUME for more details regarding our Job Program, Employment offers for all Offices. CC: Forward All

Re: [PATCH 0/3] Fix y2038 issues for security/keys subsystem

2017-09-15 Thread Baolin Wang
Hi James, On 21 August 2017 at 20:12, Baolin Wang wrote: > Hi David and James, > > On 9 August 2017 at 16:28, David Howells wrote: >> The rxrpc patch isn't part of the security/keys subsystem. I'll push it >> to the network tree. The other two I'll

Re: Page allocator bottleneck

2017-09-15 Thread Jesper Dangaard Brouer
On Thu, 14 Sep 2017 19:49:31 +0300 Tariq Toukan wrote: > Hi all, > > As part of the efforts to support increasing next-generation NIC speeds, > I am investigating SW bottlenecks in network stack receive flow. > > Here I share some numbers I got for a simple experiment, in

Re: [PATCH] dt-bindings: net: renesas-ravb: Add support for R8A77995 RAVB

2017-09-15 Thread Simon Horman
On Thu, Sep 14, 2017 at 12:44:58PM +0300, Sergei Shtylyov wrote: > Hello! > > On 9/14/2017 3:06 AM, Yoshihiro Shimoda wrote: > > >Add a new compatible string for the R8A77995 (R-Car D3) RAVB. > > > >Acked-by: Geert Uytterhoeven > >Usually those are added after

Re: [PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread David Miller
From: Eric Dumazet Date: Fri, 15 Sep 2017 17:03:30 -0700 > On Fri, 2017-09-15 at 15:54 -0700, Florian Fainelli wrote: >> On September 15, 2017 3:22:18 PM PDT, Rosen Penev >> wrote: >> >On a linksys E1200v1 (actually a crossflashed E1000v2), the >>

Re: [PATCH] once: switch to new jump label API

2017-09-15 Thread Eric Biggers
On Tue, Aug 22, 2017 at 02:44:41PM -0400, Hannes Frederic Sowa wrote: > Eric Biggers writes: > > > From: Eric Biggers > > > > Switch the DO_ONCE() macro from the deprecated jump label API to the new > > one. The new one is more readable, and for

[PATCH iproute2] Add information about COLORFGBG to ip.8 man page

2017-09-15 Thread Roland Hopferwieser
diff --git a/man/man8/ip.8 b/man/man8/ip.8 index ae018fdf..2a27a56e 100644 --- a/man/man8/ip.8 +++ b/man/man8/ip.8 @@ -187,7 +187,8 @@ executes specified command over all objects, it depends if command supports this .TP .BR "\-c" , " -color" -Use color output. +Use color output. The color

Re: Use after free in __dst_destroy_metrics_generic

2017-09-15 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

[PATCH 1/2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
Write assignment statement outside of the if statement. Done using the following semantic patch by coccinelle. @@ identifier E; expression F; statement S; @@ -if((E = F)) +E = F; +if(E) S Signed-off-by: Srishti Sharma --- drivers/staging/irda/drivers/irda-usb.c | 4

[PATCH 2/2] Staging: irda: Remove parentheses on the right of assignment

2017-09-15 Thread Srishti Sharma
Parentheses are not needed on the right hand side of assignment statement in most cases. Done using the following semantic patch by coccinelle. @@ identifier E,F,G,f; expression e,r; @@ ( E = (G == F); | E = (e == r); | E = -( ... -) ; ) Signed-off-by: Srishti Sharma ---

Re: [PATCH net] net: systemport: Fix 64-bit stats deadlock

2017-09-15 Thread David Miller
From: Florian Fainelli Date: Tue, 12 Sep 2017 13:14:26 -0700 > We can enter a deadlock situation because there is no sufficient protection > when ndo_get_stats64() runs in process context to guard against RX or TX NAPI > contexts running in softirq, this can lead to the

Re: [PATCH 2/2] Staging: irda: Remove parentheses on the right of assignment

2017-09-15 Thread Joe Perches
On Sat, 2017-09-16 at 02:36 +0530, Srishti Sharma wrote: > Parentheses are not needed on the right hand side of assignment > statement in most cases. Done using the following semantic > patch by coccinelle. [] > @@ > identifier E,F,G,f; > expression e,r; > @@ > > ( > E = (G == F); > > > > E =

[PATCH 0/2] Assign outside if

2017-09-15 Thread Srishti Sharma
This patch series intends to remove the assignment statements inside the if statement, and eliminates the cases of parentheses around the right hand side of assignment generated as a result of the same. Srishti Sharma (2): Staging: irda: Don't use assignment inside if statement Staging:

Re: [PATCH] VSOCK: fix uapi/linux/vm_sockets.h incomplete types

2017-09-15 Thread David Miller
From: Stefan Hajnoczi Date: Tue, 12 Sep 2017 17:34:35 +0100 > This patch fixes the following compiler errors when userspace > applications use the vm_sockets.h header: > > include/uapi/linux/vm_sockets.h:148:32: error: invalid application of > ‘sizeof’ to incomplete type

Re: [Outreachy kernel] [PATCH v2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 2:39 AM, Julia Lawall wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall wrote: >> > >> > >> > On Sat, 16 Sep 2017, Srishti Sharma wrote: >> > >> >> Write assignment

Re: [PATCH net-next v1] bridge: also trigger RTM_NEWLINK when interface is released from bridge

2017-09-15 Thread Vincent Bernat
❦ 15 septembre 2017 21:38 +0200, Vincent Bernat  : > Currently, when an interface is released from a bridge, we get a > RTM_DELLINK event through netlink: > > Deleted 2: dummy0: mtu 1500 master bridge0 > state UNKNOWN > link/ether

Re: [PATCH v2] net: smsc911x: Quieten netif during suspend

2017-09-15 Thread David Miller
From: Geert Uytterhoeven Date: Wed, 13 Sep 2017 19:42:05 +0200 > If the network interface is kept running during suspend, the net core > may call net_device_ops.ndo_start_xmit() while the Ethernet device is > still suspended, which may lead to a system crash. > > E.g.

Re: [PATCH] net: ipv4: fix l3slave check for index returned in IP_PKTINFO

2017-09-15 Thread David Miller
From: David Ahern Date: Wed, 13 Sep 2017 17:11:37 -0700 > rt_iif is only set to the actual egress device for the output path. The > recent change to consider the l3slave flag when returning IP_PKTINFO > works for local traffic (the correct device index is returned), but it >

Re: [PATCH net] tcp: update skb->skb_mstamp more carefully

2017-09-15 Thread David Miller
From: Eric Dumazet Date: Wed, 13 Sep 2017 20:30:39 -0700 > From: Eric Dumazet > > liujian reported a problem in TCP_USER_TIMEOUT processing with a patch > in tcp_probe_timer() : > https://www.spinics.net/lists/netdev/msg454496.html > > After

Re: [PATCH net] netvsc: increase default receive buffer size

2017-09-15 Thread David Miller
From: Stephen Hemminger Date: Thu, 14 Sep 2017 09:31:07 -0700 > The default receive buffer size was reduced by recent change > to a value which was appropriate for 10G and Windows Server 2016. > But the value is too small for full performance with 40G on Azure. >

Re: [PATCH net] net: systemport: Fix 64-bit stats deadlock

2017-09-15 Thread David Miller
From: Florian Fainelli Date: Fri, 15 Sep 2017 14:28:40 -0700 > FYI, there is another patch needed to ensure consistency between > ethtool reported stats and netdevice stats, will submit that after > some more testing. Thanks! Yes, I saw that, th anks.

Re: [PATCH net] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-15 Thread Guillaume Nault
On Fri, Sep 15, 2017 at 04:55:02PM +0200, Sabrina Dubroca wrote: > 2017-09-15, 10:42:59 +0100, Tom Parkin wrote: > > On Fri, Sep 15, 2017 at 11:08:07AM +0200, Sabrina Dubroca wrote: > > > The tunnel is currently removed from the list during destruction. This > > > can lead to a double-free of the

Re: [PATCH] qed: remove unnecessary call to memset

2017-09-15 Thread David Miller
From: Himanshu Jha Date: Tue, 12 Sep 2017 16:49:22 +0530 > call to memset to assign 0 value immediately after allocating > memory with kzalloc is unnecesaary as kzalloc allocates the memory > filled with 0 value. > > Semantic patch used to resolve this issue: > >

Re: [Outreachy kernel] [PATCH v2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> Write assignment statement outside the if statement. Done using >> the following semantic patch by coccinelle. >> >> @@ >> identifier E; >> expression F; >> statement

Re: [PATCH net] ipv6: fix net.ipv6.conf.all interface DAD handlers

2017-09-15 Thread David Miller
From: Matteo Croce Date: Tue, 12 Sep 2017 17:46:37 +0200 > Currently, writing into > net.ipv6.conf.all.{accept_dad,use_optimistic,optimistic_dad} has no effect. > Fix handling of these flags by: > > - using the maximum of global and per-interface values for the > accept_dad

Re: [PATCH] net: vrf: avoid gcc-4.6 warning

2017-09-15 Thread David Miller
From: Arnd Bergmann Date: Tue, 12 Sep 2017 22:10:53 +0200 > When building an allmodconfig kernel with gcc-4.6, we get a rather > odd warning: > > drivers/net/vrf.c: In function ‘vrf_ip6_input_dst’: > drivers/net/vrf.c:964:3: error: initialized field with side-effects >

Re: [PATCH net] net: systemport: Fix 64-bit stats deadlock

2017-09-15 Thread Florian Fainelli
On September 15, 2017 2:25:11 PM PDT, David Miller wrote: >From: Florian Fainelli >Date: Tue, 12 Sep 2017 13:14:26 -0700 > >> We can enter a deadlock situation because there is no sufficient >protection >> when ndo_get_stats64() runs in process context

Re: [PATCH net] sctp: fix an use-after-free issue in sctp_sock_dump

2017-09-15 Thread David Miller
From: Xin Long Date: Fri, 15 Sep 2017 11:02:21 +0800 > Commit 86fdb3448cc1 ("sctp: ensure ep is not destroyed before doing the > dump") tried to fix an use-after-free issue by checking !sctp_sk(sk)->ep > with holding sock and sock lock. > > But Paolo noticed that endpoint

Re: [Outreachy kernel] Re: [PATCH 2/2] Staging: irda: Remove parentheses on the right of assignment

2017-09-15 Thread Julia Lawall
On Fri, 15 Sep 2017, Joe Perches wrote: > On Sat, 2017-09-16 at 02:36 +0530, Srishti Sharma wrote: > > Parentheses are not needed on the right hand side of assignment > > statement in most cases. Done using the following semantic > > patch by coccinelle. > [] > > @@ > > identifier E,F,G,f; > >

Re: [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err

2017-09-15 Thread David Miller
From: Xin Long Date: Fri, 15 Sep 2017 11:02:48 +0800 > sctp_diag would not actually dump out sk/asoc if inet_sctp_diag_fill > returns err, in which case it shouldn't mark sk dumped by setting > cb->args[3] as 1 in sctp_sock_dump(). > > Otherwise, it could cause some asocs

Re: [PATCH net] bpf/verifier: reject BPF_ALU64|BPF_END

2017-09-15 Thread David Miller
From: Edward Cree Date: Fri, 15 Sep 2017 14:37:38 +0100 > Neither ___bpf_prog_run nor the JITs accept it. > Also adds a new test case. > > Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") > Signed-off-by: Edward Cree Applied and queued up

Re: [Outreachy kernel] [PATCH v2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Julia Lawall
On Sat, 16 Sep 2017, Srishti Sharma wrote: > On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall wrote: > > > > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > > > >> Write assignment statement outside the if statement. Done using > >> the following semantic patch by

[PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread Rosen Penev
On a linksys E1200v1 (actually a crossflashed E1000v2), the offloading features give no measurable benefit to speed or latency. Furthermore, disabling GRO actually improves iperf performance by a whoppimg 3mbps. Results: Currently: [ 4] local 192.168.1.1 port 5001 connected with 192.168.1.100

Re: Use after free in __dst_destroy_metrics_generic

2017-09-15 Thread Julian Anastasov
Hello, On Fri, 15 Sep 2017, Eric Dumazet wrote: > 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

Re: Use after free in __dst_destroy_metrics_generic

2017-09-15 Thread Subash Abhinov Kasiviswanathan
May be I'm missing some posting but I don't see if the patch was tested successfully. Regards -- Julian Anastasov Hi Julian I've had this patch being tested for the last 3-4 days in our regression rack and I haven't seen the same issue being reproduced or even a

Re: selftests/bpf doesn't compile

2017-09-15 Thread Shuah Khan
On 09/15/2017 12:14 PM, Alexei Starovoitov wrote: > On Fri, Sep 15, 2017 at 11:00:31AM -0600, Shuah Khan wrote: I could add a special target for bpf TARGET_BPF perhaps and exclude it from the run_test> >>> I'm not sure what was the motivation to exclude hotplug from default >>>

Re: [PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread Florian Fainelli
On September 15, 2017 3:22:18 PM PDT, Rosen Penev wrote: >On a linksys E1200v1 (actually a crossflashed E1000v2), the offloading >features give no measurable benefit to speed or latency. Furthermore, >disabling GRO actually improves iperf performance by a whoppimg 3mbps. Do you

Re: [PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread David Miller
From: Rosen Penev Date: Fri, 15 Sep 2017 15:22:18 -0700 > On a linksys E1200v1 (actually a crossflashed E1000v2), the offloading > features give no measurable benefit to speed or latency. Furthermore, > disabling GRO actually improves iperf performance by a whoppimg 3mbps. >

Re: [PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread Eric Dumazet
On Fri, 2017-09-15 at 15:54 -0700, Florian Fainelli wrote: > On September 15, 2017 3:22:18 PM PDT, Rosen Penev > wrote: > >On a linksys E1200v1 (actually a crossflashed E1000v2), the > offloading > >features give no measurable benefit to speed or latency. Furthermore, >

Re: [PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread rosenp
Ok fair enough. Will only disable GRO in the driver. Tests were done using "ethtool -K eth0 gro off" and on. On Fri, 2017-09-15 at 17:03 -0700, Eric Dumazet wrote: > On Fri, 2017-09-15 at 15:54 -0700, Florian Fainelli wrote: > > On September 15, 2017 3:22:18 PM PDT, Rosen Penev

Re: selftests/bpf doesn't compile

2017-09-15 Thread Shuah Khan
On 09/15/2017 12:48 PM, Daniel Borkmann wrote: > On 09/15/2017 08:23 PM, Daniel Borkmann wrote: >> On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: >>> On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote: > On Thu, Sep 14, 2017 at

Re: [PATCH net] tcp: update skb->skb_mstamp more carefully

2017-09-15 Thread Eric Dumazet
On Fri, 2017-09-15 at 14:37 -0700, David Miller wrote: > From: Eric Dumazet > Date: Wed, 13 Sep 2017 20:30:39 -0700 > > > From: Eric Dumazet > > > > liujian reported a problem in TCP_USER_TIMEOUT processing with a patch > > in tcp_probe_timer() : > >

[PATCH net] tcp: fix data delivery rate

2017-09-15 Thread Eric Dumazet
From: Eric Dumazet Now skb->mstamp_skb is updated later, we also need to call tcp_rate_skb_sent() after the update is done. Fixes: 8c72c65b426b ("tcp: update skb->skb_mstamp more carefully") Signed-off-by: Eric Dumazet --- net/ipv4/tcp_output.c |7

Re: [PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread rosenp
you're absolutely correct. will send an updated version shortly. On Fri, 2017-09-15 at 16:14 -0700, David Miller wrote: > From: Rosen Penev > Date: Fri, 15 Sep 2017 15:22:18 -0700 > > > On a linksys E1200v1 (actually a crossflashed E1000v2), the > offloading features give no

Re: [PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread Eric Dumazet
On Fri, 2017-09-15 at 17:10 -0700, ros...@gmail.com wrote: > Ok fair enough. Will only disable GRO in the driver. Well, do not even try. NETIF_F_SOFT_FEATURES is set by core networking stack in register_netdevice(), ( commit 212b573f5552c60265da721ff9ce32e3462a2cdd ) Absolutely no driver

[PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread Rosen Penev
On a linksys E1200v1 (actually a crossflashed E1000v2), the offloading features give no measurable benefit to speed or latency. Furthermore, disabling GRO actually improves iperf performance by a whoppimg 3mbps. Results: Currently: [ 4] local 192.168.1.1 port 5001 connected with 192.168.1.100

Re: [PATCH] bgmac: Remove all offloading features, including GRO.

2017-09-15 Thread rosenp
netif_receive_skb seems to have the same effect as "ethtool -K eth0 gro off". On Fri, 2017-09-15 at 17:18 -0700, Eric Dumazet wrote: > On Fri, 2017-09-15 at 17:10 -0700, ros...@gmail.com wrote: > > Ok fair enough. Will only disable GRO in the driver. > > Well, do not even try. > >

  1   2   >