[PATCH net-next] qed: Set error code for allocation failures

2017-10-26 Thread Dan Carpenter
There are several places where we accidentally return success when kcalloc() fails. Fixes: fcb39f6c10b2 ("qed: Add mpa buffer descriptors for storing and processing mpa fpdus") Signed-off-by: Dan Carpenter diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/q

Re: [PATCH iproute2] ip: add fastopen_no_cookie option to ip route

2017-10-26 Thread Stephen Hemminger
On Thu, 26 Oct 2017 11:10:38 -0700 Christoph Paasch wrote: > This patch adds fastopen_no_cookie option to enable/disable TCP fastopen > without a cookie on a per-route basis. > > Support in Linux was added with 71c02379c762 (tcp: Configure TFO without > cookie per socket and/or per route). > >

[PATCH v3 0/2] refactor code and mark expected switch fall-throughs

2017-10-26 Thread Gustavo A. R. Silva
The aim of this patchset is firstly to refactor code in nr_route.c in order to make it easier to read and maintain and, secondly, to mark some expected switch fall-throughs in preparation to enabling -Wimplicit-fallthrough. I have to mention that I did not implement any unit test. If someone has

Re: WARNING in refcount_sub_and_test

2017-10-26 Thread Dmitry Vyukov
On Thu, Oct 26, 2017 at 6:56 PM, Xin Long wrote: > Hi all, > > I am failed to reproduce it on target kernel with the reproducer file > or replaying the target syzkaller description log file, do I made > something wrong or there exists more subjects then the line in > repro.

Re: WARNING in refcount_sub_and_test

2017-10-26 Thread Dmitry Vyukov
On Fri, Oct 27, 2017 at 4:30 AM, ChunYu Wang wrote: > Maybe I have just made some mistakes on understanding the reproduction > methods, will try it again. This is reproducible with the C program. If bot posts it, it was able to reproduce the bug with the compiled C program. If it was not able to

Re: KASAN: use-after-free Read in get_work_pool

2017-10-26 Thread Dmitry Vyukov
On Thu, Oct 26, 2017 at 7:58 PM, Tejun Heo wrote: > Hello, > > On Thu, Oct 26, 2017 at 09:35:44AM -0700, syzbot wrote: >> BUG: KASAN: use-after-free in __read_once_size >> include/linux/compiler.h:276 [inline] >> BUG: KASAN: use-after-free in atomic64_read >> arch/x86/include/asm/atomic64_64.h:21

[PATCH] drivers/net: chelsio/cxgb*: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Santosh Raspatur Cc: Ganesh Goudar Cc: Casey Leedom Cc: netdev@vger.kernel.org Signed-off-by: Kees Co

[PATCH] drivers/net: appletalk/cops: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Allen Pais Cc: "David S. Miller" Cc: David Howells Cc: netdev@vger.kernel.org Signed-off-by: Kees Coo

[PATCH] drivers/net: amd: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Tom Lendacky Cc: "David S. Miller" Cc: Allen Pais Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook

[PATCH] drivers/net: korina: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Roman Yeryomin Cc: Florian Fainelli Cc: netdev@vger.kernel.org Signed-off-by: K

[PATCH] drivers/net: fealnx: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: "yuval.sh...@oracle.com" Cc: Allen Pais Cc: Stephen Hemminger Cc: Philippe Rey

[PATCH] drivers/net: natsemi: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Allen Pais Cc: Eric Dumazet Cc: Philippe Reynes Cc: Wei Yongjun Cc: netdev@vg

[PATCH] drivers/net: packetengines: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Allen Pais Cc: yuan linyu Cc: Philippe Reynes Cc: netdev@vger.kernel.org Signe

[PATCH] drivers/net: mellanox: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Saeed Mahameed Cc: Matan Barak Cc: Leon Romanovsky Cc: netdev@vger.kernel.org Cc: linux-r...@vger.ker

[PATCH] drivers/net: smsc: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: "yuval.sh...@oracle.com" Cc: Eric Dumazet Cc: Philippe Reynes Cc: Allen Pais

[PATCH] netfilter: ipvs: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Wensong Zhang Cc: Simon Horman Cc: Julian Anastasov Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc:

[PATCH] drivers/net: dlink: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Denis Kirjanov Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/ethernet/dlink/sun

[PATCH] drivers/net: 8390: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/ethernet/8390/axnet_cs.c | 10 +---

[PATCH v3 1/2] net: netrom: nr_route: refactor code in nr_add_node

2017-10-26 Thread Gustavo A. R. Silva
Code refactoring in order to make the code easier to read and maintain. Signed-off-by: Gustavo A. R. Silva --- Changes in v2: Make use of the swap macro and remove inline keyword. Changes in v3: Update subject. net/netrom/nr_route.c | 59 ++- 1

[PATCH v3 2/2] net: netrom: nr_route: mark expected switch fall-throughs

2017-10-26 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- Changes in v2: None. Changes in v3: Update subject. net/netrom/nr_route.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/netrom/nr_r

Re: v6/sit tunnels and VRFs

2017-10-26 Thread Jeff Barnhill
Thanks, David. I corrected the static route, applied the patch, and set the link/output dev on the tunnel and it works now. Is it required to set the link/output dev? I was thinking that this should not be required for cases where the outgoing device is not known, for instance on a router or dev

Re: [PATCH net-next] net: dsa: Simplify dsa_slave_phy_setup()

2017-10-26 Thread Martin Hundebøll
On 2017-10-26 18:45, Florian Fainelli wrote: On 10/26/2017 04:07 AM, Martin Hundebøll wrote: On 2017-10-26 02:32, Florian Fainelli wrote: Remove the code that tried to identify if a PHY designated by Device Tree required diversion through the DSA-created MDIO bus. This was created mainly for th

Re: [PATCH net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-10-26 Thread Song Liu
> On Oct 26, 2017, at 7:01 PM, Cong Wang wrote: > > On Thu, Oct 26, 2017 at 4:50 PM, Song Liu wrote: >> In this case, we are putting CONFIG_IPV6 in TRACE_EVENT macro, which >> generates >> warnings like: >> >> ./include/trace/events/tcp.h:274:1: error: directive in argument list >> ./include/

About CFG80211_REQUIRE_SIGNED_REGDB in Kconfig

2017-10-26 Thread Yoshihiro Shimoda
Hi, I have a question about CFG80211_REQUIRE_SIGNED_REGDB behavior in the latest net-next.git. Since my environment disables CONFIG_EXPERT, CFG80211_CERTIFICATION_ONUS is also disabled. In this case, menuconfig doesn't show me the config because the net/wireless/Kconfig has: config CFG80211_R

Re: [PATCH v2] ipv6: esp6: use BUG_ON instead of if condition followed by BUG

2017-10-26 Thread Gustavo A. R. Silva
Quoting Herbert Xu : On Thu, Oct 26, 2017 at 07:51:06AM -0500, Gustavo A. R. Silva wrote: Use BUG_ON instead of if condition followed by BUG in esp_remove_trailer. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Herbert Xu Thanks! -- G

Re: [PATCH] net: tipc: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
On Tue, Oct 24, 2017 at 11:44 AM, Jon Maloy wrote: > NAK. It doesn't sound like a good idea to send this to net. Especially since > one of these timers has already been refactored in net-next. Hi! I'm not sure what you mean about the one timer issue. I don't see any use of timer_setup() in net/t

[PATCH v2 net-next 13/15] tcp: Namespace-ify sysctl_tcp_app_win

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 8 net/ipv4/tcp_ipv4.c| 1 + 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/inclu

[PATCH v2 net-next 05/15] tcp: Namespace-ify sysctl_tcp_retrans_collapse

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_ipv4.c| 2 +- net/ipv4/tcp_output.c | 5 + 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include

[PATCH v2 net-next 10/15] tcp: remove stale sysctl_tcp_reordering

2017-10-26 Thread Eric Dumazet
This extern is no longer used. Signed-off-by: Eric Dumazet --- include/net/tcp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index e7b15e9f6e288908bf58a28fe24554630c1e0710..fc134ba74c7d38d08304b5be36506946784538f2 100644 --- a/include/net/tcp.h +++

[PATCH v2 net-next 08/15] tcp: Namespace-ify sysctl_tcp_abort_on_overflow

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_minisocks.c | 4 +--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/include/net/netns/ipv4.h b/include/net/netns/

[PATCH v2 net-next 15/15] tcp: Namespace-ify sysctl_tcp_frto

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c| 1 + 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/ne

[PATCH v2 net-next 09/15] tcp: Namespace-ify sysctl_tcp_fack

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_minisocks.c | 2 +- 6 files changed, 11 insertions(+), 12

[PATCH v2 net-next 12/15] tcp: Namespace-ify sysctl_tcp_dsack

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 5 ++--- net/ipv4/tcp_ipv4.c| 1 + 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/

[PATCH v2 net-next 06/15] tcp: Namespace-ify sysctl_tcp_stdurg

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 3 +-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/net/netns/ipv4.h b/include/net/netns/i

[PATCH v2 net-next 11/15] tcp: Namespace-ify sysctl_tcp_max_reordering

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c| 2 ++ 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/n

[PATCH v2 net-next 14/15] tcp: Namespace-ify sysctl_tcp_adv_win_scale

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 9 - net/ipv4/sysctl_net_ipv4.c | 18 +- net/ipv4/tcp_input.c | 13 + net/ipv4/tcp_ipv4.c| 1 + 5 files changed, 20 insertions(+), 22 deletions(-) d

[PATCH v2 net-next 01/15] tcp: Namespace-ify sysctl_tcp_early_retrans

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 18 +- net/ipv4/tcp_input.c | 1 - net/ipv4/tcp_ipv4.c| 1 + net/ipv4/tcp_output.c | 4 +++- 6 files changed, 14 insertions(+),

Re: [PATCH net-next 00/15] tcp: move 14 sysctls to namespaces

2017-10-26 Thread Eric Dumazet
On Fri, 2017-10-27 at 13:46 +0900, David Miller wrote: > From: Eric Dumazet > Date: Thu, 26 Oct 2017 16:35:11 -0700 > > > Ideally all TCP sysctls should be per netns. > > This patch series takes care of 14 of sysctls. > > More to come later. > > The tcp-fack patch doesn't apply cleanly, please r

[PATCH v2 net-next 07/15] tcp: Namespace-ify sysctl_tcp_rfc1337

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 1 - net/ipv4/tcp_minisocks.c | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/net/

[PATCH v2 net-next 04/15] tcp: Namespace-ify sysctl_tcp_slow_start_after_idle

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 3 +-- net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_ipv4.c| 1 + net/ipv4/tcp_output.c | 5 + 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/includ

[PATCH v2 net-next 00/15] tcp: move 14 sysctls to namespaces

2017-10-26 Thread Eric Dumazet
Ideally all TCP sysctls should be per netns. This patch series takes care of 14 of sysctls. More to come later. Eric Dumazet (15): tcp: Namespace-ify sysctl_tcp_early_retrans tcp: Namespace-ify sysctl_tcp_recovery tcp: Namespace-ify sysctl_tcp_thin_linear_timeouts tcp: Namespace-ify sysctl

[PATCH v2 net-next 03/15] tcp: Namespace-ify sysctl_tcp_thin_linear_timeouts

2017-10-26 Thread Eric Dumazet
Note that sysctl_tcp_thin_dupack was not used, I deleted it. Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 2 -- net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_timer.c | 4 +--- 4 files changed, 9 insertions(+), 12 deletions

[PATCH v2 net-next 02/15] tcp: Namespace-ify sysctl_tcp_recovery

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 2 +- net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_ipv4.c| 1 + net/ipv4/tcp_recovery.c| 2 -- 6 files changed, 11 insertions(+), 11 d

Re: pull-request: mac80211 2017-10-25

2017-10-26 Thread David Miller
From: Johannes Berg Date: Wed, 25 Oct 2017 16:03:42 +0200 > Here are a few more fixes for net, we started comprehensive testing > for the security issues and found that the problem wasn't addressed > in TKIP, so that's included, along with a handful other fixes. > > Please pull and let me know i

Re: [PATCH 1/1] l2tp: cleanup l2tp_tunnel_delete calls

2017-10-26 Thread David Miller
From: Jiri Slaby Date: Wed, 25 Oct 2017 15:57:55 +0200 > l2tp_tunnel_delete does not return anything since commit 62b982eeb458 > ("l2tp: fix race condition in l2tp_tunnel_delete"). But call sites of > l2tp_tunnel_delete still do casts to void to avoid unused return value > warnings. > > Kill th

Re: [PATCH net-next 00/15] tcp: move 14 sysctls to namespaces

2017-10-26 Thread David Miller
From: Eric Dumazet Date: Thu, 26 Oct 2017 16:35:11 -0700 > Ideally all TCP sysctls should be per netns. > This patch series takes care of 14 of sysctls. > More to come later. The tcp-fack patch doesn't apply cleanly, please respin. Thank you.

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-26 Thread Eric Dumazet
On Thu, 2017-10-26 at 21:28 -0700, Cong Wang wrote: > On Thu, Oct 26, 2017 at 9:05 PM, Eric Dumazet wrote: > > On Thu, 2017-10-26 at 18:24 -0700, Cong Wang wrote: > >> ... > > > >> On the other hand, this makes tcf_block_put() ugly and > >> harder to understand. Since David and Eric strongly disli

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-26 Thread Cong Wang
On Thu, Oct 26, 2017 at 9:05 PM, Eric Dumazet wrote: > On Thu, 2017-10-26 at 18:24 -0700, Cong Wang wrote: >> ... > >> On the other hand, this makes tcf_block_put() ugly and >> harder to understand. Since David and Eric strongly dislike >> adding synchronize_rcu(), this is probably the only >> sol

[PATCH net] tcp: refresh tp timestamp before tcp_mtu_probe()

2017-10-26 Thread Eric Dumazet
From: Eric Dumazet In the unlikely event tcp_mtu_probe() is sending a packet, we want tp->tcp_mstamp being as accurate as possible. This means we need to call tcp_mstamp_refresh() a bit earlier in tcp_write_xmit(). Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path") Signed-off-by: E

[PATCH] ipv6: exthdrs: use swap macro in ipv6_dest_hao

2017-10-26 Thread Gustavo A. R. Silva
make use of the swap macro and remove unnecessary variable tmp_addr. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/ipv6/exthdrs.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --g

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-26 Thread Eric Dumazet
On Thu, 2017-10-26 at 18:24 -0700, Cong Wang wrote: > ... > On the other hand, this makes tcf_block_put() ugly and > harder to understand. Since David and Eric strongly dislike > adding synchronize_rcu(), this is probably the only > solution that could make everyone happy. ... > +static void tc

breakage due to commit 6e617de84e ("net: avoid a full fib lookup when rp_filter is disabled")

2017-10-26 Thread David Ahern
Hi Paolo: Your commit: commit 6e617de84e87d626d1e976fc30e1322239fd4d2d Author: Paolo Abeni Date: Wed Sep 20 18:26:53 2017 +0200 net: avoid a full fib lookup when rp_filter is disabled. breaks a test case that uses a veth pair in the same network namespace but separate VRFs. This setup:

Re: [PATCH] drivers/net: 3com/3c515: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:51:03 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: "David S. Miller" > Cc: Thomas Gleixn

Re: [PATCH] drivers/net: can: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:51:14 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Wolfgang Grandegger > Cc: Marc Kleine

Re: [PATCH] drivers/net: netronome: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:51:38 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Jakub Kicinski > Cc: "David S. Miller

Re: [PATCH] drivers/net: hamradio/yam: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:51:20 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. Initialization was entirely missing. > > Cc: J

Re: [PATCH] drivers/net: nuvoton: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:51:58 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Wan ZongShun > Cc: linux-arm-ker...@l

Re: [PATCH] drivers/net: realtek: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:53:12 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Realtek linux nic maintainers > Cc: "

Re: [PATCH] drivers/net: wan/dscc4: Remove unused timer

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:53:42 -0700 > This removes an entirely unused timer, which avoids needing to convert it > to timer_setup(). > > Cc: Francois Romieu > Cc: netdev@vger.kernel.org > Signed-off-by: Kees Cook Applied.

Re: [PATCH] drivers/net: wan/lmc: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:53:53 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Allen Pais > Cc: "David S. Miller" >

Re: [PATCH] drivers/net: sxgbe: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:53:20 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Byungho An > Cc: Girish K S > Cc: Vi

Re: [PATCH] drivers/net: wan/sdla: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:53:59 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Allen Pais > Cc: "David S. Miller" >

Re: [PATCH] drivers/net: arcnet: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:54:06 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Michael Grzeschik > Cc: netdev@vger.k

Re: [PATCH] drivers/net: hippi: Convert timers to use timer_setup()

2017-10-26 Thread David Miller
From: Kees Cook Date: Wed, 25 Oct 2017 03:51:29 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Jes Sorensen > Cc: linux-hi...@sunsit

[PATCH V2 net] tuntap: properly align skb->head before building skb

2017-10-26 Thread Jason Wang
An unaligned alloc_frag->offset caused by previous allocation will result an unaligned skb->head. This will lead unaligned skb_shared_info and then unaligned dataref which requires to be aligned for accessing on some architecture. Fix this by aligning alloc_frag->offset before the frag refilling.

Re: [PATCH net] tuntap: properly align skb->head before building skb

2017-10-26 Thread Jason Wang
On 2017年10月26日 22:11, Eric Dumazet wrote: On Thu, Oct 26, 2017 at 5:15 AM, Jason Wang wrote: An unaligned alloc_frag->offset caused by previous allocation will result an unaligned skb->head. This will lead unaligned skb_shared_info and then unaligned dataref which requires to be aligned for a

Re: [PATCH] thunderbolt: Drop sequence number check from tb_xdomain_match()

2017-10-26 Thread David Miller
From: Mika Westerberg Date: Wed, 25 Oct 2017 12:27:34 +0300 > Commit 9a03c3d398c1 ("thunderbolt: Fix a couple right shifting to zero > bugs") revealed an issue that was previously hidden because we never > actually compared received XDomain message sequence numbers properly. > The idea with these

Re: [PATCH v9 00/10] net: stmmac: dwmac-sun8i: Handle integrated PHY

2017-10-26 Thread David Miller
From: Corentin Labbe Date: Tue, 24 Oct 2017 19:57:04 +0200 > The first 7 patch should go via the sunxi tree, the last three via > the net tree. I've applied the last 3 patches to net-next.

Re: [PATCH net-next] net: updating dst lastusage is an unlikely event.

2017-10-26 Thread David Miller
From: Paolo Abeni Date: Tue, 24 Oct 2017 12:41:01 +0200 > Since commit 0da4af00b2ed ("ipv6: only update __use and lastusetime > once per jiffy at most"), updating the dst lastuse field is an > unlikely action: it happens at most once per jiffy, out of > potentially millions of calls per second. >

[PATCH net-next] stmmac: copy unicast mac address to MAC registers

2017-10-26 Thread Bhadram Varka
Currently stmmac driver not copying the valid ethernet MAC address to MAC registers. This patch takes care of updating the MAC register with MAC address. Signed-off-by: Bhadram Varka --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 +++- 1 file changed, 15 insertions(+), 1

Re: WARNING in refcount_sub_and_test

2017-10-26 Thread ChunYu Wang
Maybe I have just made some mistakes on understanding the reproduction methods, will try it again. Thanks, - ChunYu On Thu, Oct 26, 2017 at 10:49 PM, Dmitry Vyukov wrote: > On Thu, Oct 26, 2017 at 10:53 AM, ChunYu Wang wrote: >> Hi all, >> >> I am failed to reproduce it on target kernel with th

Re: [PATCH net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-10-26 Thread Cong Wang
On Thu, Oct 26, 2017 at 4:50 PM, Song Liu wrote: > In this case, we are putting CONFIG_IPV6 in TRACE_EVENT macro, which generates > warnings like: > > ./include/trace/events/tcp.h:274:1: error: directive in argument list > ./include/trace/events/tcp.h:281:1: error: directive in argument list > > S

Re: [PATCH net-next v5 2/2] bridge: vlan: signal if anything changed on vlan add

2017-10-26 Thread Toshiaki Makita
On 2017/10/26 22:41, Nikolay Aleksandrov wrote: > Before this patch there was no way to tell if the vlan add operation > actually changed anything, thus we would always generate a notification > on adds. Let's make the notifications more precise and generate them > only if anything changed, so use

[Patch net 03/16] net_sched: use tcf_queue_work() in bpf filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_bpf.c | 19 +-- 1 file c

[Patch net 07/16] net_sched: use tcf_queue_work() in fw filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_fw.c | 19 --- 1 file ch

[Patch net 14/16] net_sched: fix call_rcu() race on act_sample module removal

2017-10-26 Thread Cong Wang
Similar to commit c78e1746d3ad ("net: sched: fix call_rcu() race on classifier module unloads"), we need to wait for flying RCU callback tcf_sample_cleanup_rcu(). Cc: Yotam Gigi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/s

[Patch net 13/16] net_sched: add rtnl assertion to tcf_exts_destroy()

2017-10-26 Thread Cong Wang
After previous patches, it is now safe to claim that tcf_exts_destroy() is always called with RTNL lock. Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_api.c | 1 + 1 file changed, 1 insertion(+)

[Patch net 02/16] net_sched: use tcf_queue_work() in basic filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_basic.c | 20 +--- 1 fil

[Patch net 12/16] net_sched: use tcf_queue_work() in tcindex filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_tcindex.c | 38 +

[Patch net 04/16] net_sched: use tcf_queue_work() in cgroup filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_cgroup.c | 22 ++ 1

[Patch net 10/16] net_sched: use tcf_queue_work() in route filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_route.c | 19 --- 1 file

[Patch net 11/16] net_sched: use tcf_queue_work() in rsvp filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_rsvp.h | 19 --- 1 file

[Patch net 15/16] selftests: Introduce a new script to generate tc batch file

2017-10-26 Thread Cong Wang
From: Chris Mi # ./tdc_batch.py -h usage: tdc_batch.py [-h] [-n NUMBER] [-o] [-s] [-p] device file TC batch file generator positional arguments: devicedevice name file batch file name optional arguments: -h, --helpshow this hel

[Patch net 05/16] net_sched: use tcf_queue_work() in flow filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_flow.c | 19 --- 1 file

[Patch net 09/16] net_sched: use tcf_queue_work() in u32 filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_u32.c | 29 ++---

[Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-26 Thread Cong Wang
This patch introduces a dedicated workqueue for tc filters so that each tc filter's RCU callback could defer their action destroy work to this workqueue. The helper tcf_queue_work() is introduced for them to use. Because we hold RTNL lock when calling tcf_block_put(), we can not simply flush works

[Patch net 06/16] net_sched: use tcf_queue_work() in flower filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_flower.c | 19 --- 1 fil

[Patch net 16/16] selftests: Introduce a new test case to tc testsuite

2017-10-26 Thread Cong Wang
From: Chris Mi In this patchset, we fixed a tc bug. This patch adds the test case that reproduces the bug. To run this test case, user should specify an existing NIC device: # sudo ./tdc.py -d enp4s0f0 This test case belongs to category "flower". If user doesn't specify a NIC device, the test

[Patch net 08/16] net_sched: use tcf_queue_work() in matchall filter

2017-10-26 Thread Cong Wang
Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang --- net/sched/cls_matchall.c | 19 --- 1 f

[Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-26 Thread Cong Wang
Recently, the RCU callbacks used in TC filters and TC actions keep drawing my attention, they introduce at least 4 race condition bugs: 1. A simple one fixed by Daniel: commit c78e1746d3ad7d548bdf3fe491898cc453911a49 Author: Daniel Borkmann Date: Wed May 20 17:13:33 2015 +0200 net: sched:

[PATCH net-next] nfp: inform the VF driver needs to be restarted after changing the MAC

2017-10-26 Thread Jakub Kicinski
From: Pablo Cascón Add message to inform the VF MAC was changed and the need to restart the VF driver for the changes to be effective. Signed-off-by: Pablo Cascón Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c | 8 +++- 1 file changed, 7 insertions(+)

RE: removing bridge in vlan_filtering mode requests delete of attached ports main MAC address

2017-10-26 Thread Keller, Jacob E
> -Original Message- > From: Keller, Jacob E > Sent: Thursday, October 26, 2017 1:33 PM > To: Keller, Jacob E ; vyase...@redhat.com; > netdev@vger.kernel.org > Cc: Malek, Patryk > Subject: RE: removing bridge in vlan_filtering mode requests delete of > attached > ports main MAC address >

Re: [PATCH net-next 5/9] net: dsa: use dsa_is_user_port everywhere

2017-10-26 Thread Florian Fainelli
On 10/26/2017 08:22 AM, Vivien Didelot wrote: > Most of the DSA code still check ds->enabled_port_mask directly to > inspect a given port type instead of using the provided dsa_is_user_port > helper. Change this. > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian

[iproute2 PATCH] tc/mqprio: Offload mode and shaper options in mqprio

2017-10-26 Thread Amritha Nambiar
This patch was previously submitted as RFC. Submitting this as non-RFC now that the tc/mqprio changes are accepted in net-next. Adds new mqprio options for 'mode' and 'shaper'. The mode option can take values for offload modes such as 'dcb' (default), 'channel' with the 'hw' option set to 1. The n

Re: [PATCH net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-10-26 Thread Song Liu
> On Oct 25, 2017, at 8:13 PM, kbuild test robot wrote: > > Hi Song, > > [auto build test WARNING on net-next/master] > > url: > https://github.com/0day-ci/linux/commits/Song-Liu/tcp-add-tracepoint-trace_tcp_retransmit_synack/20171026-010651 > reproduce: >

[PATCH net-next] liquidio: fix kernel panic in VF driver

2017-10-26 Thread Felix Manlunas
Doing ifconfig down on VF driver in the middle of receiving line rate traffic causes a kernel panic: LiquidIO_VF :02:00.3: should not come here should not get rx when poll mode = 0 for vf BUG: unable to handle kernel NULL pointer dereference at (null) . . . C

[PATCH net-next 07/15] tcp: Namespace-ify sysctl_tcp_rfc1337

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 1 - net/ipv4/tcp_minisocks.c | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/net/

[PATCH net-next 06/15] tcp: Namespace-ify sysctl_tcp_stdurg

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 3 +-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/net/netns/ipv4.h b/include/net/netns/i

[PATCH net-next 05/15] tcp: Namespace-ify sysctl_tcp_retrans_collapse

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_ipv4.c| 2 +- net/ipv4/tcp_output.c | 5 + 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include

[PATCH net-next 15/15] tcp: Namespace-ify sysctl_tcp_frto

2017-10-26 Thread Eric Dumazet
Signed-off-by: Eric Dumazet --- include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++--- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c| 1 + 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/ne

  1   2   3   4   >