[PATCH 1/1] ipv4: fix NULL pointer dereference in __inet_put_port()

2016-03-28 Thread fanhui
There may be race condition when accessing inet_csk(sk)->icsk_bind_hash, which leads to a crash like this: Unable to handle kernel NULL pointer dereference at virtual address 0010 .. [] inet_put_port+0x80/0xb8 [] tcp_set_state+0xc4/0x110 [] tcp_done+0x60/0xb8 [] tcp_nuke_addr+0x22c/0x2a0 [

[PATCH net-next] net: hns: add support of pause frame ctrl for HNS V2

2016-03-28 Thread Yisen Zhuang
From: Lisheng The patch adds support of pause ctrl for HNS V2, and this feature is lost by HNS V1: 1) service ports can disable rx pause frame, 2) debug ports can open tx/rx pause frame. And this patch updates the REGs about the pause ctrl when updated status function called by upp

[net-next] bond: output message before setting slave to inactive

2016-03-28 Thread Zhang Shengju
This patch moves output message before setting slave to inactive, this will print the correct status of slave device. Signed-off-by: Zhang Shengju --- drivers/net/bonding/bond_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/dri

[PATCH 01/16] wcn36xx: Clean up wcn36xx_smd_send_beacon

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs Needed for coming improvements. No functional changes. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/hal.h | 7 +-- drivers/net/wireless/ath/wcn36xx/smd.c | 12 +--- 2 files changed, 10 insertions(+), 9 deletion

[PATCH 04/16] wcn36xx: Use consistent name for private vif

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs Some code used priv_vif and some used vif_priv. Convert all to vif_priv for consistency. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/smd.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-

[PATCH 00/16] Misc wcn36xx fixes

2016-03-28 Thread Bjorn Andersson
As I was debugging some issues with the wcn36xx driver I found a series of patches that exists in Eugene's github tree but not in mainline. Noteworthy is the long requested feature of having working ARP support. Please apply these rebased and relocated patches. Jason Mobarak (1): wcn36xx: don'

[PATCH 03/16] wcn36xx: Add helper macros to cast vif to private vif and vice versa

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs Makes the code a little easier to read. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/debug.c | 12 +++- drivers/net/wireless/ath/wcn36xx/main.c| 16 +++- drivers/net/wireless/ath/wcn36xx/pmc.c

[PATCH 02/16] wcn36xx: Pad TIM PVM if needed

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs The wcn36xx FW expects a fixed size TIM PVM in the beacon template. If supplied with a shorter than expected PVM it will overwrite the IE following the TIM. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/hal.h | 3 +++ drive

[PATCH 14/16] wcn36xx: Implement multicast filtering

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs Pass the multicast list to FW. This patch also adds a way to build the smd command in place. This is needed because the MC list command is too big for the stack. Signed-off-by: Pontus Fuchs [bjorn: dropped FIF_PROMISC_IN_BSS usage] Signed-off-by: Bjorn Andersson Signed-off

[PATCH 11/16] wcn36xx: Use allocated self sta index instead of hard coded

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/smd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index ce764cce1a3e..8b30

[PATCH 06/16] wcn36xx: Fetch private sta data from sta entry instead of from vif

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs For consistency with other code. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wc

[PATCH 08/16] wcn36xx: Remove sta pointer in private vif struct

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs This does not work with multiple sta's in a vif. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/main.c| 3 --- drivers/net/wireless/ath/wcn36xx/smd.c | 28 +++- drivers/net/wireless/ath/wcn36x

[PATCH 10/16] wcn36xx: Copy all members in config_sta v1 conversion

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs When converting to version 1 of the config_sta struct not all members where copied. This fixes the problem of multicast frames not being delivered on an encrypted network. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/smd.c

[PATCH 07/16] wcn36xx: Add helper macros to cast sta to priv

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs While poking at this I also change two related things. I rename one variable to make the names consistent. I also move one assignment of priv_sta to the declaration to save a few lines. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/

[PATCH 09/16] wcn36xx: Parse trigger_ba response properly

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs This message does not follow the canonical format and needs it's own parser. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/smd.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH 05/16] wcn36xx: Use define for invalid index and fix typo

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/hal.h | 2 +- drivers/net/wireless/ath/wcn36xx/main.c | 4 ++-- drivers/net/wireless/ath/wcn36xx/smd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dri

[PATCH 16/16] wcn36xx: Use correct command struct for EXIT_BMPS_REQ

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs EXIT_BMPS_REQ was using the command struct for ENTER_BMPS_REQ. I spotted this when looking at command dumps. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/smd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH 15/16] wcn36xx: don't pad beacons for mesh

2016-03-28 Thread Bjorn Andersson
From: Jason Mobarak Patch "wcn36xx: Pad TIM PVM if needed" has caused a regression in mesh beaconing. The field tim_off is always 0 for mesh mode, and thus pvm_len (referring to the TIM length field) and pad are both incorrectly calculated. Thus, msg_body.beacon_length is incorrectly calculated

[PATCH 13/16] wcn36xx: Track association state

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs Knowing the association state is needed for mc filtering. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/main.c| 2 ++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drive

[PATCH 12/16] wcn36xx: Clear encrypt_type when deleting bss key

2016-03-28 Thread Bjorn Andersson
From: Pontus Fuchs This fixes a problem connecting to an open network after being connected to an encrypted network. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireles

Re: [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call

2016-03-28 Thread James Cameron
On Tue, Mar 29, 2016 at 12:47:20PM +0800, Wei-Ning Huang wrote: > "single skb allocation failure" happens when system is under heavy > memory pressure. Add __GFP_REPEAT to skb allocation call so kernel > attempts to reclaim pages and retry the allocation. Oh, that's interesting, we're back to thi

Re: am335x: no multicast reception over VLAN

2016-03-28 Thread Yegor Yefremov
Hi Mugunthan, On Tue, Mar 29, 2016 at 6:00 AM, Mugunthan V N wrote: > Hi Yegor > > On Wednesday 16 March 2016 08:35 PM, Yegor Yefremov wrote: >> I have an am335x based board using CPSW in Dual EMAC mode. Without >> VLAN IDs I can receive and send multicast packets [1]. When I create >> VLAN ID: >

Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port

2016-03-28 Thread Cong Wang
On Mon, Mar 28, 2016 at 9:42 AM, Xin Long wrote: > There is an issue when we use mavtap over team: > When we replug nic links from team0, the real nics's mc list will not > include the maddr for macvtap any more. then we can't receive pkts to > macvtap device, as they are filterred by mc list of n

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 9:15 PM, Alex Duyck wrote: > On Mon, Mar 28, 2016 at 9:01 PM, Tom Herbert wrote: >> On Mon, Mar 28, 2016 at 8:27 PM, Alexander Duyck >> wrote: >>> On Mon, Mar 28, 2016 at 8:17 PM, Tom Herbert wrote: On Mon, Mar 28, 2016 at 6:54 PM, Jesse Gross wrote: > On Mon,

[PATCH] mwifiex: add __GFP_REPEAT to skb allocation call

2016-03-28 Thread Wei-Ning Huang
"single skb allocation failure" happens when system is under heavy memory pressure. Add __GFP_REPEAT to skb allocation call so kernel attempts to reclaim pages and retry the allocation. Signed-off-by: Wei-Ning Huang --- drivers/net/wireless/marvell/mwifiex/sdio.c | 12 1 file chang

Re: [PATCH 3/4] wcn36xx: Transition driver to SMD client

2016-03-28 Thread Bjorn Andersson
On Mon, Jan 11, 2016 at 1:02 AM, Eugene Krasnikov wrote: > Better late than never! Looks good to me. > Unfortunately I ran into an issue with ordering of operations between the WiFi driver and the wcnss_ctrl driver. So an updated series is on the way, but this depends on changes to the wcnss_ctrl

Re: [RFC PATCH] tcp: Add SOF_TIMESTAMPING_TX_EOR and allow MSG_EOR in tcp_sendmsg

2016-03-28 Thread Yuchung Cheng
On Sun, Mar 27, 2016 at 10:42 PM, Martin KaFai Lau wrote: > > On Fri, Mar 25, 2016 at 04:05:51PM -0700, Yuchung Cheng wrote: > > Looks like an interesting and useful patch. Since HTTP2 allows > > multiplexing data stream frames from multiple logical streams on a > > single socket, > > how would yo

Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port

2016-03-28 Thread David Miller
From: Xin Long Date: Tue, 29 Mar 2016 00:42:31 +0800 > There is an issue when we use mavtap over team: > When we replug nic links from team0, the real nics's mc list will not > include the maddr for macvtap any more. then we can't receive pkts to > macvtap device, as they are filterred by mc list

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Alex Duyck
On Mon, Mar 28, 2016 at 9:01 PM, Tom Herbert wrote: > On Mon, Mar 28, 2016 at 8:27 PM, Alexander Duyck > wrote: >> On Mon, Mar 28, 2016 at 8:17 PM, Tom Herbert wrote: >>> On Mon, Mar 28, 2016 at 6:54 PM, Jesse Gross wrote: On Mon, Mar 28, 2016 at 6:24 PM, Tom Herbert wrote: > On Mon,

Re: [PATCH net 0/4] misc. small fixes.

2016-03-28 Thread David Miller
From: Michael Chan Date: Mon, 28 Mar 2016 19:46:03 -0400 > Misc. small fixes for net. Series applied, thanks Michael.

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 8:27 PM, Alexander Duyck wrote: > On Mon, Mar 28, 2016 at 8:17 PM, Tom Herbert wrote: >> On Mon, Mar 28, 2016 at 6:54 PM, Jesse Gross wrote: >>> On Mon, Mar 28, 2016 at 6:24 PM, Tom Herbert wrote: On Mon, Mar 28, 2016 at 4:58 PM, Alexander Duyck wrote: >

Re: am335x: no multicast reception over VLAN

2016-03-28 Thread Mugunthan V N
Hi Yegor On Wednesday 16 March 2016 08:35 PM, Yegor Yefremov wrote: > I have an am335x based board using CPSW in Dual EMAC mode. Without > VLAN IDs I can receive and send multicast packets [1]. When I create > VLAN ID: > > ip link add link eth1 name eth1.100 type vlan id 100 > ip addr add 192.168

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Alexander Duyck
On Mon, Mar 28, 2016 at 8:17 PM, Tom Herbert wrote: > On Mon, Mar 28, 2016 at 6:54 PM, Jesse Gross wrote: >> On Mon, Mar 28, 2016 at 6:24 PM, Tom Herbert wrote: >>> On Mon, Mar 28, 2016 at 4:58 PM, Alexander Duyck >>> wrote: This patch should fix the issues seen with a recent fix to preve

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 6:54 PM, Jesse Gross wrote: > On Mon, Mar 28, 2016 at 6:24 PM, Tom Herbert wrote: >> On Mon, Mar 28, 2016 at 4:58 PM, Alexander Duyck wrote: >>> This patch should fix the issues seen with a recent fix to prevent >>> tunnel-in-tunnel frames from being generated with GRO.

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Jesse Gross
On Mon, Mar 28, 2016 at 4:58 PM, Alexander Duyck wrote: > This patch should fix the issues seen with a recent fix to prevent > tunnel-in-tunnel frames from being generated with GRO. The fix itself is > correct for now as long as we do not add any devices that support > NETIF_F_GSO_GRE_CSUM. When

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Alexander Duyck
On Mon, Mar 28, 2016 at 5:50 PM, Tom Herbert wrote: > On Mon, Mar 28, 2016 at 4:34 PM, Jesse Gross wrote: >> * A packet is received that is encapsulated with two layers of GRE. It >> looks like this: Eth|IP|GRE|IP|GRE|IP|TCP >> * The packet is processed through GRO successfully. skb->encapsulatio

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Jesse Gross
On Mon, Mar 28, 2016 at 6:24 PM, Tom Herbert wrote: > On Mon, Mar 28, 2016 at 4:58 PM, Alexander Duyck wrote: >> This patch should fix the issues seen with a recent fix to prevent >> tunnel-in-tunnel frames from being generated with GRO. The fix itself is >> correct for now as long as we do not

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 4:58 PM, Alexander Duyck wrote: > This patch should fix the issues seen with a recent fix to prevent > tunnel-in-tunnel frames from being generated with GRO. The fix itself is > correct for now as long as we do not add any devices that support > NETIF_F_GSO_GRE_CSUM. When

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 19:54 -0400, David Miller wrote: > From: Eric Dumazet > Date: Mon, 28 Mar 2016 13:51:46 -0700 > > > On Mon, 2016-03-28 at 13:46 -0700, Eric Dumazet wrote: > > > >> We have at least 384 bytes of padding in skb->head (this is struct > >> skb_shared_info). > >> > >> Whatever

Re: [net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 4:58 PM, Alexander Duyck wrote: > This patch should fix the issues seen with a recent fix to prevent > tunnel-in-tunnel frames from being generated with GRO. The fix itself is > correct for now as long as we do not add any devices that support > NETIF_F_GSO_GRE_CSUM. When

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 4:34 PM, Jesse Gross wrote: > On Mon, Mar 28, 2016 at 3:10 PM, Tom Herbert wrote: >> On Mon, Mar 28, 2016 at 1:34 PM, Alexander Duyck >> wrote: >>> On Mon, Mar 28, 2016 at 1:03 PM, Tom Herbert wrote: On Mon, Mar 28, 2016 at 12:31 PM, Alexander Duyck wrote: >>>

Re: [PATCH net,stable] qmi_wwan: add "D-Link DWM-221 B1" device id

2016-03-28 Thread David Miller
From: Bjørn Mork Date: Mon, 28 Mar 2016 22:38:16 +0200 > Thomas reports: > "Windows: ... > Linux: ... > Reported-by: Thomas Schäfer > Signed-off-by: Bjørn Mork Applied and queued up for -stable, thanks!

[net PATCH] gro: Allow tunnel stacking in the case of FOU/GUE

2016-03-28 Thread Alexander Duyck
This patch should fix the issues seen with a recent fix to prevent tunnel-in-tunnel frames from being generated with GRO. The fix itself is correct for now as long as we do not add any devices that support NETIF_F_GSO_GRE_CSUM. When such a device is added it could have the potential to mess thing

[PATCH net 3/4] bnxt_en: Fix typo in bnxt_hwrm_set_pause_common().

2016-03-28 Thread Michael Chan
The typo caused the wrong flow control bit to be set. Reported by: Ajit Khaparde Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadc

[PATCH net 2/4] bnxt_en: Implement proper firmware message padding.

2016-03-28 Thread Michael Chan
The size of every padded firmware message is specified in the first HWRM_VER_GET response message. Use this value to pad every message after that. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ 2 files chan

[PATCH net 0/4] misc. small fixes.

2016-03-28 Thread Michael Chan
Misc. small fixes for net. Michael Chan (4): bnxt_en: Initialize CP doorbell value before ring allocation bnxt_en: Implement proper firmware message padding. bnxt_en: Fix typo in bnxt_hwrm_set_pause_common(). bnxt_en: Fix ethtool -a reporting. drivers/net/ethernet/broadcom/bnxt/bnxt.c

[PATCH net 4/4] bnxt_en: Fix ethtool -a reporting.

2016-03-28 Thread Michael Chan
To report flow control tx/rx settings accurately regardless of autoneg setting, we should use link_info->req_flow_ctrl. Before this patch, the reported settings were only correct when autoneg was on. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 ++ 1

[PATCH net 1/4] bnxt_en: Initialize CP doorbell value before ring allocation

2016-03-28 Thread Michael Chan
From: Prashant Sreedharan The existing code does the following: allocate completion ring initialize completion ring doorbell disable interrupts on this completion ring by writing to the doorbell We can have a race where firmware sends an asynchronous event to the host after completio

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread David Miller
From: Eric Dumazet Date: Mon, 28 Mar 2016 13:51:46 -0700 > On Mon, 2016-03-28 at 13:46 -0700, Eric Dumazet wrote: > >> We have at least 384 bytes of padding in skb->head (this is struct >> skb_shared_info). >> >> Whatever garbage we might read, current code is fine. >> >> We have to deal with

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread David Miller
From: Jan Engelhardt Date: Mon, 28 Mar 2016 22:20:39 +0200 (CEST) > > On Monday 2016-03-28 21:29, David Miller wrote: > > @@ -3716,6 +3716,8 @@ void tcp_parse_options(const struct sk_buff *skb, > > length--; > > continue; > > default: >>>

Re: [PATCH] ipv6: Fix the pmtu path for connected UDP socket

2016-03-28 Thread Martin KaFai Lau
On Mon, Mar 28, 2016 at 03:39:42PM -0700, Cong Wang wrote: > On Fri, Mar 25, 2016 at 5:16 PM, Martin KaFai Lau wrote: > > On Fri, Mar 25, 2016 at 04:55:27PM -0700, Martin KaFai Lau wrote: > >> void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu) > >> { > >> + struct dst_

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Jesse Gross
On Mon, Mar 28, 2016 at 3:10 PM, Tom Herbert wrote: > On Mon, Mar 28, 2016 at 1:34 PM, Alexander Duyck > wrote: >> On Mon, Mar 28, 2016 at 1:03 PM, Tom Herbert wrote: >>> On Mon, Mar 28, 2016 at 12:31 PM, Alexander Duyck >>> wrote: On Mon, Mar 28, 2016 at 11:47 AM, Tom Herbert wrote:

Re: [PATCH] ipv6: Fix the pmtu path for connected UDP socket

2016-03-28 Thread Cong Wang
On Fri, Mar 25, 2016 at 5:16 PM, Martin KaFai Lau wrote: > On Fri, Mar 25, 2016 at 04:55:27PM -0700, Martin KaFai Lau wrote: >> void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu) >> { >> + struct dst_entry *odst; >> + >> + odst = sk_dst_get(sk); >> + >> ip6_u

Re: [RFT Patch net 1/2] ipv6: invalidate the socket cached route on pmtu events if possible

2016-03-28 Thread Cong Wang
On Fri, Mar 25, 2016 at 11:11 AM, Eric Dumazet wrote: > On Fri, 2016-03-25 at 10:17 -0700, Cong Wang wrote: > >> 1) sock lock protects the whole update: the whole check, update, recheck, >> set logic, to make sure another CPU will not do the same to the same socket >> at the same time. >> >> 2) th

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 1:34 PM, Alexander Duyck wrote: > On Mon, Mar 28, 2016 at 1:03 PM, Tom Herbert wrote: >> On Mon, Mar 28, 2016 at 12:31 PM, Alexander Duyck >> wrote: >>> On Mon, Mar 28, 2016 at 11:47 AM, Tom Herbert wrote: On Mon, Mar 28, 2016 at 10:37 AM, Alexander Duyck wrot

Re: RESEND: Easily reproducible kernel panic due to netdev all_adj_list refcnt handling

2016-03-28 Thread Matthias Schiffer
On 03/25/2016 11:10 PM, Andrew Collins wrote: > On 03/25/2016 02:43 PM, Matthias Schiffer wrote: >> We've tried your patch, and it changes the symptoms a bit, but doesn't fix >> the panic. I've attached kernel logs of the crash both before and after >> applying the patch. >> >> One note: I did not

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 23:11 +0200, Jozsef Kadlecsik wrote: > In net/netfilter/nf_conntrack_proto_tcp.c we copy the options into a > buffer with skb_header_pointer(), so it's not a false positive there and > the KASAN report referred to that part. > Although the out of bound could be one extra

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Jozsef Kadlecsik
On Mon, 28 Mar 2016, Eric Dumazet wrote: > On Mon, 2016-03-28 at 22:20 +0200, Jan Engelhardt wrote: > > On Monday 2016-03-28 21:29, David Miller wrote: > > >>> > > @@ -3716,6 +3716,8 @@ void tcp_parse_options(const struct sk_buff > > >>> > > *skb, > > >>> > > length--; > > >>> > >

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Eric Dumazet
On Fri, 2016-03-25 at 17:08 -0700, Tom Herbert wrote: > On Fri, Mar 25, 2016 at 3:29 PM, Eric Dumazet wrote: > > +/* Must be called under rcu_read_lock(). > > > It might be just as easy to do the rcu_read_lock() within the > function. That way we don't need to require callers to do it now. > >

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 13:46 -0700, Eric Dumazet wrote: > We have at least 384 bytes of padding in skb->head (this is struct > skb_shared_info). > > Whatever garbage we might read, current code is fine. > > We have to deal with a false positive here. Very similar to the one fixed in https://git

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 22:20 +0200, Jan Engelhardt wrote: > On Monday 2016-03-28 21:29, David Miller wrote: > >>> > > @@ -3716,6 +3716,8 @@ void tcp_parse_options(const struct sk_buff > >>> > > *skb, > >>> > > length--; > >>> > > continue; > >>> > > default: >

[PATCH] ethernet: mvneta: Support netpoll

2016-03-28 Thread Ezequiel Garcia
This commit adds the support for netpoll, which is used to implement netconsole. Signed-off-by: Ezequiel Garcia --- Tested on Armada 370 Mirabox and Armada XP Openblocks AX3-4 with netconsole. drivers/net/ethernet/marvell/mvneta.c | 21 + 1 file changed, 21 insertions(+) di

[PATCH net,stable] qmi_wwan: add "D-Link DWM-221 B1" device id

2016-03-28 Thread Bjørn Mork
Thomas reports: "Windows: 00 diagnostics 01 modem 02 at-port 03 nmea 04 nic Linux: T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2001 ProdID=7e19 Rev=02.32 S: Manufacturer=Mobile Connect S: Product=Mobi

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Alexander Duyck
On Mon, Mar 28, 2016 at 1:03 PM, Tom Herbert wrote: > On Mon, Mar 28, 2016 at 12:31 PM, Alexander Duyck > wrote: >> On Mon, Mar 28, 2016 at 11:47 AM, Tom Herbert wrote: >>> On Mon, Mar 28, 2016 at 10:37 AM, Alexander Duyck >>> wrote: On Mon, Mar 28, 2016 at 9:31 AM, Tom Herbert wrote: >>>

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Jan Engelhardt
On Monday 2016-03-28 21:29, David Miller wrote: >>> > > @@ -3716,6 +3716,8 @@ void tcp_parse_options(const struct sk_buff *skb, >>> > > length--; >>> > > continue; >>> > > default: >>> > > +if (length < 2) >>> > > +return; >>> > >

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Rick Jones
On 03/28/2016 01:01 PM, Eric Dumazet wrote: Note : file structures got RCU freeing back in 2.6.14, and I do not think named users ever complained about added cost ;) Couldn't see the tree for the forest I guess :) rick

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 15:29 -0400, David Miller wrote: > From: Jozsef Kadlecsik > Date: Mon, 28 Mar 2016 18:48:51 +0200 (CEST) > > >> > > @@ -3716,6 +3716,8 @@ void tcp_parse_options(const struct sk_buff *skb, > >> > > length--; > >> > > continue; > >> > > de

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 12:31 PM, Alexander Duyck wrote: > On Mon, Mar 28, 2016 at 11:47 AM, Tom Herbert wrote: >> On Mon, Mar 28, 2016 at 10:37 AM, Alexander Duyck >> wrote: >>> On Mon, Mar 28, 2016 at 9:31 AM, Tom Herbert wrote: On Sun, Mar 27, 2016 at 9:38 PM, Jesse Gross wrote: >

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 12:11 -0700, Rick Jones wrote: > I was under the impression that individual DNS queries were supposed to > have not only random DNS query IDs but also originate from random UDP > source ports. https://tools.ietf.org/html/rfc5452 4.5 at least touches > on the topic but I d

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

2016-03-28 Thread David Miller
From: Pablo Neira Ayuso Date: Mon, 28 Mar 2016 19:57:53 +0200 > The following patchset contains Netfilter fixes for you net tree, > they are: ... > This batch comes with four patches to validate x_tables blobs coming > from userspace. CONFIG_USERNS exposes the x_tables interface to > unpriviledg

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread David Miller
From: Jesse Gross Date: Sun, 27 Mar 2016 21:38:34 -0700 > Generally speaking, multiple levels of encapsulation offload are not > valid. That's very much not true Jesse. Please fix the regression you introduced or I will have no choice but to revert your entire set of changes.

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Alexander Duyck
On Mon, Mar 28, 2016 at 11:47 AM, Tom Herbert wrote: > On Mon, Mar 28, 2016 at 10:37 AM, Alexander Duyck > wrote: >> On Mon, Mar 28, 2016 at 9:31 AM, Tom Herbert wrote: >>> On Sun, Mar 27, 2016 at 9:38 PM, Jesse Gross wrote: On Sat, Mar 26, 2016 at 12:41 PM, Tom Herbert wrote: > On Sa

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread David Miller
From: Jozsef Kadlecsik Date: Mon, 28 Mar 2016 18:48:51 +0200 (CEST) >> > > @@ -3716,6 +3716,8 @@ void tcp_parse_options(const struct sk_buff *skb, >> > > length--; >> > > continue; >> > > default: >> > > +if (length < 2) >> > > +re

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Rick Jones
On 03/28/2016 11:55 AM, Eric Dumazet wrote: On Mon, 2016-03-28 at 11:44 -0700, Rick Jones wrote: On 03/28/2016 10:00 AM, Eric Dumazet wrote: If you mean that a busy DNS resolver spends _most_ of its time doing : fd = socket() bind(fd port=0) < send and receive one frame > close(fd) Yes.

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 11:44 -0700, Rick Jones wrote: > On 03/28/2016 10:00 AM, Eric Dumazet wrote: > > On Mon, 2016-03-28 at 09:15 -0700, Rick Jones wrote: > >> On 03/25/2016 03:29 PM, Eric Dumazet wrote: > >>> UDP sockets are not short lived in the high usage case, so the added > >>> cost of call_

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 10:37 AM, Alexander Duyck wrote: > On Mon, Mar 28, 2016 at 9:31 AM, Tom Herbert wrote: >> On Sun, Mar 27, 2016 at 9:38 PM, Jesse Gross wrote: >>> On Sat, Mar 26, 2016 at 12:41 PM, Tom Herbert wrote: On Sat, Mar 19, 2016 at 9:32 AM, Jesse Gross wrote: > When dri

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Rick Jones
On 03/28/2016 10:00 AM, Eric Dumazet wrote: On Mon, 2016-03-28 at 09:15 -0700, Rick Jones wrote: On 03/25/2016 03:29 PM, Eric Dumazet wrote: UDP sockets are not short lived in the high usage case, so the added cost of call_rcu() should not be a concern. Even a busy DNS resolver? If you mean

Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port

2016-03-28 Thread Jiri Pirko
Mon, Mar 28, 2016 at 06:42:31PM CEST, lucien@gmail.com wrote: >There is an issue when we use mavtap over team: >When we replug nic links from team0, the real nics's mc list will not >include the maddr for macvtap any more. then we can't receive pkts to >macvtap device, as they are filterred by

[PATCH 1/9] netfilter: ipset: fix race condition in ipset save, swap and delete

2016-03-28 Thread Pablo Neira Ayuso
From: Vishwanath Pai This fix adds a new reference counter (ref_netlink) for the struct ip_set. The other reference counter (ref) can be swapped out by ip_set_swap and we need a separate counter to keep track of references for netlink events like dump. Using the same ref counter for dump causes a

[PATCH 0/9] Netfilter fixes for net

2016-03-28 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter fixes for you net tree, they are: 1) There was a race condition between parallel save/swap and delete, which resulted a kernel crash due to the increase ref for save, swap, wrong ref decrease operations. Reported and fixed by Vishwanath Pa

[PATCH 7/9] netfilter: nfnetlink_queue: honor NFQA_CFG_F_FAIL_OPEN when netlink unicast fails

2016-03-28 Thread Pablo Neira Ayuso
When netlink unicast fails to deliver the message to userspace, we should also check if the NFQA_CFG_F_FAIL_OPEN flag is set so we reinject the packet back to the stack. I think the user expects no packet drops when this flag is set due to queueing to userspace errors, no matter if related to the

[PATCH 3/9] openvswitch: call only into reachable nf-nat code

2016-03-28 Thread Pablo Neira Ayuso
From: Arnd Bergmann The openvswitch code has gained support for calling into the nf-nat-ipv4/ipv6 modules, however those can be loadable modules in a configuration in which openvswitch is built-in, leading to link errors: net/built-in.o: In function `__ovs_ct_lookup': :(.text+0x2cc2c8): undefine

[PATCH 4/9] netfilter: x_tables: validate e->target_offset early

2016-03-28 Thread Pablo Neira Ayuso
From: Florian Westphal We should check that e->target_offset is sane before mark_source_chains gets called since it will fetch the target entry for loop detection. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- net/ipv4/netfilter/arp_tables.c | 17 - net/

[PATCH 5/9] netfilter: x_tables: make sure e->next_offset covers remaining blob size

2016-03-28 Thread Pablo Neira Ayuso
From: Florian Westphal Otherwise this function may read data beyond the ruleset blob. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- net/ipv4/netfilter/arp_tables.c | 6 -- net/ipv4/netfilter/ip_tables.c | 6 -- net/ipv6/netfilter/ip6_tables.c | 6 -- 3 file

[PATCH 9/9] netfilter: ipv4: fix NULL dereference

2016-03-28 Thread Pablo Neira Ayuso
From: Liping Zhang Commit fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob") use sock_net(skb->sk) to get the net namespace, but we can't assume that sk_buff->sk is always exist, so when it is NULL, oops will happen. Signed-off-by: Liping Zhang Reviewed-by: Nikolay Borisov Signed-o

[PATCH 8/9] netfilter: x_tables: enforce nul-terminated table name from getsockopt GET_ENTRIES

2016-03-28 Thread Pablo Neira Ayuso
Make sure the table names via getsockopt GET_ENTRIES is nul-terminated in ebtables and all the x_tables variants and their respective compat code. Uncovered by KASAN. Reported-by: Baozeng Ding Signed-off-by: Pablo Neira Ayuso --- net/bridge/netfilter/ebtables.c | 4 net/ipv4/netfilter/arp_

[PATCH 2/9] openvswitch: Fix checking for new expected connections.

2016-03-28 Thread Pablo Neira Ayuso
From: Jarno Rajahalme OVS should call into CT NAT for packets of new expected connections only when the conntrack state is persisted with the 'commit' option to the OVS CT action. The test for this condition is doubly wrong, as the CT status field is ANDed with the bit number (IPS_EXPECTED_BIT)

[PATCH 6/9] netfilter: x_tables: fix unconditional helper

2016-03-28 Thread Pablo Neira Ayuso
From: Florian Westphal Ben Hawkes says: In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it is possible for a user-supplied ipt_entry structure to have a large next_offset field. This field is not bounds checked prior to writing a counter value at the supplied offset. Pro

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Alexander Duyck
On Mon, Mar 28, 2016 at 9:31 AM, Tom Herbert wrote: > On Sun, Mar 27, 2016 at 9:38 PM, Jesse Gross wrote: >> On Sat, Mar 26, 2016 at 12:41 PM, Tom Herbert wrote: >>> On Sat, Mar 19, 2016 at 9:32 AM, Jesse Gross wrote: When drivers express support for TSO of encapsulated packets, they

Re: [PATCH] net: macb: Only call GPIO functions if there is a valid GPIO

2016-03-28 Thread Sergei Shtylyov
Hello. On 03/28/2016 03:47 PM, Charles Keepax wrote: GPIOlib will print warning messages if we call GPIO functions without a valid GPIO. Change the code to avoid doing so. Signed-off-by: Charles Keepax --- drivers/net/ethernet/cadence/macb.c | 8 +--- 1 file changed, 5 insertions(+), 3

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Pablo Neira Ayuso
On Mon, Mar 28, 2016 at 06:48:51PM +0200, Jozsef Kadlecsik wrote: > Hi David, Pablo, > > David, do you agree with the patch for net/ipv4/tcp_input.c? If yes, how > should I proceed? Should I send the whole patch to you or is it OK to send > to Pablo? Submit a formal patch and Cc: netdev@vger.ke

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 09:15 -0700, Rick Jones wrote: > On 03/25/2016 03:29 PM, Eric Dumazet wrote: > > UDP sockets are not short lived in the high usage case, so the added > > cost of call_rcu() should not be a concern. > > Even a busy DNS resolver? If you mean that a busy DNS resolver spends _mo

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 9:15 AM, Rick Jones wrote: > On 03/25/2016 03:29 PM, Eric Dumazet wrote: >> >> UDP sockets are not short lived in the high usage case, so the added >> cost of call_rcu() should not be a concern. > > > Even a busy DNS resolver? > Should use connectionless UDP sockets. > ric

Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port

2016-03-28 Thread Marcelo Ricardo Leitner
On Tue, Mar 29, 2016 at 12:42:31AM +0800, Xin Long wrote: > There is an issue when we use mavtap over team: > When we replug nic links from team0, the real nics's mc list will not > include the maddr for macvtap any more. then we can't receive pkts to > macvtap device, as they are filterred by mc l

Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet

2016-03-28 Thread Jozsef Kadlecsik
Hi David, Pablo, David, do you agree with the patch for net/ipv4/tcp_input.c? If yes, how should I proceed? Should I send the whole patch to you or is it OK to send to Pablo? Best regards, Jozsef On Mon, 28 Mar 2016, Baozeng Ding wrote: > > > On 2016/3/28 10:35, Baozeng Ding wrote: > > > >

[PATCH net] team: team should sync the port's uc/mc addrs when add a port

2016-03-28 Thread Xin Long
There is an issue when we use mavtap over team: When we replug nic links from team0, the real nics's mc list will not include the maddr for macvtap any more. then we can't receive pkts to macvtap device, as they are filterred by mc list of nic. In Bonding Driver, it syncs the uc/mc addrs in bond_e

Re: [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation.

2016-03-28 Thread Tom Herbert
On Sun, Mar 27, 2016 at 9:38 PM, Jesse Gross wrote: > On Sat, Mar 26, 2016 at 12:41 PM, Tom Herbert wrote: >> On Sat, Mar 19, 2016 at 9:32 AM, Jesse Gross wrote: >>> When drivers express support for TSO of encapsulated packets, they >>> only mean that they can do it for one layer of encapsulatio

Re: [RFC PATCH 7/9] GSO: Support partial segmentation offload

2016-03-28 Thread Alexander Duyck
On Sun, Mar 27, 2016 at 10:36 PM, Jesse Gross wrote: > On Fri, Mar 18, 2016 at 4:25 PM, Alexander Duyck wrote: >> diff --git a/net/core/dev.c b/net/core/dev.c >> index edb7179bc051..666cf427898b 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -2711,6 +2711,19 @@ struct sk_buff *__skb

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Rick Jones
On 03/25/2016 03:29 PM, Eric Dumazet wrote: UDP sockets are not short lived in the high usage case, so the added cost of call_rcu() should not be a concern. Even a busy DNS resolver? rick jones

Re: [PATCH 0/3] Control ethernet PHY LEDs via LED subsystem

2016-03-28 Thread Andrew Lunn
Hi Stephen > There already is LED control via ethtool. > It is more important that the existing API (ethtool) still work. I'm having trouble finding this. The man page for ethtool only mentions -p --identify with respect to LEDs. I also don't see anything in include/uapi/linux/ethtool.h Please

  1   2   >