Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 1/5] ip6_gre: Fix MTU setting
From: Tom Herbert @ 2016-05-10  0:12 UTC (permalink / raw)
  To: davem, netdev, alexander.duyck; +Cc: kernel-team
In-Reply-To: <1462839132-980991-1-git-send-email-tom@herbertland.com>

In ip6gre_tnl_link_config set t->tun_len and t->hlen correctly for the
configuration. For hard_header_len and mtu calculation include
IPv6 header and encapsulation overhead.

In ip6gre_tunnel_init_common set t->tun_len and t->hlen correctly for
the configuration. Revert to setting hard_header_len instead of
needed_headroom.

Tested:

./ip link add name tun8 type ip6gretap remote \
2401:db00:20:911a:face:0:27:0 local \
2401:db00:20:911a:face:0:25:0 ttl 225

Gives MTU of 1434. That is equal to 1500 - 40 - 14 - 4 - 8.

./ip link add name tun8 type ip6gretap remote \
2401:db00:20:911a:face:0:27:0 local \
2401:db00:20:911a:face:0:25:0 ttl 225 okey 123

Gives MTU of 1430. That is equal to 1500 - 40 - 14 - 4 - 8 - 4.

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 net/ipv6/ip6_gre.c | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 47b671a..6d0aa94 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -700,7 +700,7 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu)
 	struct net_device *dev = t->dev;
 	struct __ip6_tnl_parm *p = &t->parms;
 	struct flowi6 *fl6 = &t->fl.u.ip6;
-	int addend = sizeof(struct ipv6hdr) + 4;
+	int t_hlen;
 
 	if (dev->type != ARPHRD_ETHER) {
 		memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr));
@@ -727,16 +727,11 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu)
 	else
 		dev->flags &= ~IFF_POINTOPOINT;
 
-	/* Precalculate GRE options length */
-	if (t->parms.o_flags&(GRE_CSUM|GRE_KEY|GRE_SEQ)) {
-		if (t->parms.o_flags&GRE_CSUM)
-			addend += 4;
-		if (t->parms.o_flags&GRE_KEY)
-			addend += 4;
-		if (t->parms.o_flags&GRE_SEQ)
-			addend += 4;
-	}
-	t->hlen = addend;
+	t->tun_hlen = gre_calc_hlen(t->parms.o_flags);
+
+	t->hlen = t->tun_hlen;
+
+	t_hlen = t->hlen + sizeof(struct ipv6hdr);
 
 	if (p->flags & IP6_TNL_F_CAP_XMIT) {
 		int strict = (ipv6_addr_type(&p->raddr) &
@@ -750,10 +745,11 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu)
 			return;
 
 		if (rt->dst.dev) {
-			dev->hard_header_len = rt->dst.dev->hard_header_len + addend;
+			dev->hard_header_len = rt->dst.dev->hard_header_len +
+					       t_hlen;
 
 			if (set_mtu) {
-				dev->mtu = rt->dst.dev->mtu - addend;
+				dev->mtu = rt->dst.dev->mtu - t_hlen;
 				if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
 					dev->mtu -= 8;
 				if (dev->type == ARPHRD_ETHER)
@@ -1027,11 +1023,12 @@ static int ip6gre_tunnel_init_common(struct net_device *dev)
 
 	tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags);
 
-	t_hlen = tunnel->hlen + sizeof(struct ipv6hdr);
+	tunnel->hlen = tunnel->tun_hlen;
 
-	dev->needed_headroom	= LL_MAX_HEADER + t_hlen + 4;
-	dev->mtu		= ETH_DATA_LEN - t_hlen - 4;
+	t_hlen = tunnel->hlen + sizeof(struct ipv6hdr);
 
+	dev->hard_header_len = LL_MAX_HEADER + t_hlen;
+	dev->mtu = ETH_DATA_LEN - t_hlen;
 	if (!(tunnel->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
 		dev->mtu -= 8;
 
-- 
2.8.0.rc2

^ permalink raw reply related

* [PATCH net-next 2/5] gre6: Fix flag translations
From: Tom Herbert @ 2016-05-10  0:12 UTC (permalink / raw)
  To: davem, netdev, alexander.duyck; +Cc: kernel-team
In-Reply-To: <1462839132-980991-1-git-send-email-tom@herbertland.com>

GRE for IPv6 does not properly translate for GRE flags to tunnel
flags and vice versa. This patch fixes that.

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 net/ipv6/ip6_gre.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 6d0aa94..509fb92 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -795,8 +795,8 @@ static void ip6gre_tnl_parm_from_user(struct __ip6_tnl_parm *p,
 	p->link = u->link;
 	p->i_key = u->i_key;
 	p->o_key = u->o_key;
-	p->i_flags = u->i_flags;
-	p->o_flags = u->o_flags;
+	p->i_flags = gre_flags_to_tnl_flags(u->i_flags);
+	p->o_flags = gre_flags_to_tnl_flags(u->o_flags);
 	memcpy(p->name, u->name, sizeof(u->name));
 }
 
@@ -813,8 +813,8 @@ static void ip6gre_tnl_parm_to_user(struct ip6_tnl_parm2 *u,
 	u->link = p->link;
 	u->i_key = p->i_key;
 	u->o_key = p->o_key;
-	u->i_flags = p->i_flags;
-	u->o_flags = p->o_flags;
+	u->i_flags = gre_tnl_flags_to_gre_flags(p->i_flags);
+	u->o_flags = gre_tnl_flags_to_gre_flags(p->o_flags);
 	memcpy(u->name, p->name, sizeof(u->name));
 }
 
@@ -1214,10 +1214,12 @@ static void ip6gre_netlink_parms(struct nlattr *data[],
 		parms->link = nla_get_u32(data[IFLA_GRE_LINK]);
 
 	if (data[IFLA_GRE_IFLAGS])
-		parms->i_flags = nla_get_be16(data[IFLA_GRE_IFLAGS]);
+		parms->i_flags = gre_flags_to_tnl_flags(
+				nla_get_be16(data[IFLA_GRE_IFLAGS]));
 
 	if (data[IFLA_GRE_OFLAGS])
-		parms->o_flags = nla_get_be16(data[IFLA_GRE_OFLAGS]);
+		parms->o_flags = gre_flags_to_tnl_flags(
+				nla_get_be16(data[IFLA_GRE_OFLAGS]));
 
 	if (data[IFLA_GRE_IKEY])
 		parms->i_key = nla_get_be32(data[IFLA_GRE_IKEY]);
@@ -1409,8 +1411,10 @@ static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev)
 	struct __ip6_tnl_parm *p = &t->parms;
 
 	if (nla_put_u32(skb, IFLA_GRE_LINK, p->link) ||
-	    nla_put_be16(skb, IFLA_GRE_IFLAGS, p->i_flags) ||
-	    nla_put_be16(skb, IFLA_GRE_OFLAGS, p->o_flags) ||
+	    nla_put_be16(skb, IFLA_GRE_IFLAGS,
+			 gre_tnl_flags_to_gre_flags(p->i_flags)) ||
+	    nla_put_be16(skb, IFLA_GRE_OFLAGS,
+			 gre_tnl_flags_to_gre_flags(p->o_flags)) ||
 	    nla_put_be32(skb, IFLA_GRE_IKEY, p->i_key) ||
 	    nla_put_be32(skb, IFLA_GRE_OKEY, p->o_key) ||
 	    nla_put_in6_addr(skb, IFLA_GRE_LOCAL, &p->laddr) ||
-- 
2.8.0.rc2

^ permalink raw reply related

* [PATCH net-next 3/5] ip6_gre: Set inner protocol correctly in __gre6_xmit
From: Tom Herbert @ 2016-05-10  0:12 UTC (permalink / raw)
  To: davem, netdev, alexander.duyck; +Cc: kernel-team
In-Reply-To: <1462839132-980991-1-git-send-email-tom@herbertland.com>

Need to use adjusted protocol value for setting inner protocol.

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 net/ipv6/ip6_gre.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 509fb92..ec209f4 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -519,7 +519,7 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
 	gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags,
 			 protocol, tunnel->parms.o_key, htonl(tunnel->o_seqno));
 
-	skb_set_inner_protocol(skb, proto);
+	skb_set_inner_protocol(skb, protocol);
 
 	return ip6_tnl_xmit(skb, dev, dsfield, fl6, encap_limit, pmtu,
 			    NEXTHDR_GRE);
-- 
2.8.0.rc2

^ permalink raw reply related

* [PATCH net-next 4/5] ip6: Don't set transport header in IPv6 tunneling
From: Tom Herbert @ 2016-05-10  0:12 UTC (permalink / raw)
  To: davem, netdev, alexander.duyck; +Cc: kernel-team
In-Reply-To: <1462839132-980991-1-git-send-email-tom@herbertland.com>

We only need to reset network header here.

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 net/ipv6/ip6_tunnel.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index ade55af..50af706 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1114,8 +1114,6 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
 		dst_cache_set_ip6(&t->dst_cache, ndst, &fl6->saddr);
 	skb_dst_set(skb, dst);
 
-	skb->transport_header = skb->network_header;
-
 	if (encap_limit >= 0) {
 		init_tel_txopt(&opt, encap_limit);
 		ipv6_push_nfrag_opts(skb, &opt.ops, &proto, NULL);
-- 
2.8.0.rc2

^ permalink raw reply related

* [PATCH net-next 5/5] ip6_gre: Use correct flags for reading TUNNEL_SEQ
From: Tom Herbert @ 2016-05-10  0:12 UTC (permalink / raw)
  To: davem, netdev, alexander.duyck; +Cc: kernel-team
In-Reply-To: <1462839132-980991-1-git-send-email-tom@herbertland.com>

Fix two spots where o_flags in a tunnel are being compared to GRE_SEQ
instead of TUNNEL_SEQ.

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 net/ipv6/ip6_gre.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index ec209f4..ee62ec4 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -343,7 +343,7 @@ static struct ip6_tnl *ip6gre_tunnel_locate(struct net *net,
 		goto failed_free;
 
 	/* Can use a lockless transmit, unless we generate output sequences */
-	if (!(nt->parms.o_flags & GRE_SEQ))
+	if (!(nt->parms.o_flags & TUNNEL_SEQ))
 		dev->features |= NETIF_F_LLTX;
 
 	dev_hold(dev);
@@ -1314,7 +1314,7 @@ static int ip6gre_newlink(struct net *src_net, struct net_device *dev,
 	dev->features		|= GRE6_FEATURES;
 	dev->hw_features	|= GRE6_FEATURES;
 
-	if (!(nt->parms.o_flags & GRE_SEQ)) {
+	if (!(nt->parms.o_flags & TUNNEL_SEQ)) {
 		/* TCP segmentation offload is not supported when we
 		 * generate output sequences.
 		 */
-- 
2.8.0.rc2

^ permalink raw reply related

* RE: [ovs-dev] [PATCH v9 net-next 4/7] openvswitch: add layer 3 flow/port support
From: Yang, Yi Y @ 2016-05-10  0:16 UTC (permalink / raw)
  To: Simon Horman, Jiri Benc; +Cc: dev@openvswitch.org, netdev@vger.kernel.org
In-Reply-To: <20160509081818.GB4470@vergenet.net>

I think it is still necessary to keep eth_type in push_eth action, for the classifier case, it will push_nsh then push_eth for the original frame, this will need to set eth_type to 0x894f by push_eth, otherwise push_eth won't know this eth_type.

-----Original Message-----
From: dev [mailto:dev-bounces@openvswitch.org] On Behalf Of Simon Horman
Sent: Monday, May 09, 2016 4:18 PM
To: Jiri Benc <jbenc@redhat.com>
Cc: dev@openvswitch.org; netdev@vger.kernel.org
Subject: Re: [ovs-dev] [PATCH v9 net-next 4/7] openvswitch: add layer 3 flow/port support

On Fri, May 06, 2016 at 11:35:04AM +0200, Jiri Benc wrote:
> On Wed,  4 May 2016 16:36:30 +0900, Simon Horman wrote:
> > +static int push_eth(struct sk_buff *skb, struct sw_flow_key *key,
> > +		    const struct ovs_action_push_eth *ethh) {
> > +	int err;
> > +
> > +	/* De-accelerate any hardware accelerated VLAN tag added to a previous
> > +	 * Ethernet header */
> > +	err = skb_vlan_deaccel(skb);
> > +	if (unlikely(err))
> > +		return err;
> > +
> > +	/* Add the new Ethernet header */
> > +	if (skb_cow_head(skb, ETH_HLEN) < 0)
> > +		return -ENOMEM;
> > +
> > +	skb_push(skb, ETH_HLEN);
> > +	skb_reset_mac_header(skb);
> > +	skb_reset_mac_len(skb);
> > +
> > +	ether_addr_copy(eth_hdr(skb)->h_source, ethh->addresses.eth_src);
> > +	ether_addr_copy(eth_hdr(skb)->h_dest, ethh->addresses.eth_dst);
> > +	eth_hdr(skb)->h_proto = ethh->eth_type;
> 
> This doesn't seem right. We know the packet type, it's skb->protocol.
> We should fill in that.

I think that makes sense. Possibly the eth_type field can be removed from ovs_action_push_eth.

> In addition, we should check whether mac_len > 0 and in such case, 
> change skb->protocol to ETH_P_TEB first (and store that value in the 
> pushed eth header).
> 
> Similarly on pop_eth, we need to check skb->protocol and if it is 
> ETH_P_TEB, call eth_type_trans on the modified frame to set the new
> skb->protocol correctly. It's probably not that simple, as we'd need a
> version of eth_type_trans that doesn't need a net device.

I'm not sure I understand the interaction with ETH_P_TEB here.

In my mind skb->protocol == ETH_P_TEB may be used early on in OvS's receive processing to find the inner protocol from the packet and at that point
skb->protocol is set to that value. And that for further packet 
skb->processing
the fact the packet was received as TEB is transparent.

Conversely, skb->protocol may be set as necessary on transmit as a packet exits OvS.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

^ permalink raw reply

* linux-next: manual merge of the net-next tree with the arm-soc tree
From: Stephen Rothwell @ 2016-05-10  0:18 UTC (permalink / raw)
  To: David Miller, netdev, Olof Johansson, Arnd Bergmann,
	linux-arm-kernel
  Cc: linux-next, linux-kernel, Bjorn Andersson, Andy Gross

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  include/linux/soc/qcom/smd.h

between commit:

  b853cb9628bf ("soc: qcom: smd: Make callback pass channel reference")

from the arm-soc tree and commit:

  43315f31adc2 ("soc: qcom: smd: Introduce compile stubs")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

I wasn't sure if the new functions introduced by b853cb9628bf also
needed compile stubs.
-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/soc/qcom/smd.h
index cb2f81559bc0,46a984f5e3a3..000000000000
--- a/include/linux/soc/qcom/smd.h
+++ b/include/linux/soc/qcom/smd.h
@@@ -44,23 -42,42 +44,49 @@@ struct qcom_smd_driver 
  
  	int (*probe)(struct qcom_smd_device *dev);
  	void (*remove)(struct qcom_smd_device *dev);
 -	int (*callback)(struct qcom_smd_device *, const void *, size_t);
 +	qcom_smd_cb_t callback;
  };
  
+ #if IS_ENABLED(CONFIG_QCOM_SMD)
+ 
  int qcom_smd_driver_register(struct qcom_smd_driver *drv);
  void qcom_smd_driver_unregister(struct qcom_smd_driver *drv);
  
 +void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel);
 +void qcom_smd_set_drvdata(struct qcom_smd_channel *channel, void *data);
 +
+ int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len);
+ 
+ #else
+ 
+ static inline int qcom_smd_driver_register(struct qcom_smd_driver *drv)
+ {
+ 	return -ENXIO;
+ }
+ 
+ static inline void qcom_smd_driver_unregister(struct qcom_smd_driver *drv)
+ {
+ 	/* This shouldn't be possible */
+ 	WARN_ON(1);
+ }
+ 
+ static inline int qcom_smd_send(struct qcom_smd_channel *channel,
+ 				const void *data, int len)
+ {
+ 	/* This shouldn't be possible */
+ 	WARN_ON(1);
+ 	return -ENXIO;
+ }
+ 
+ #endif
+ 
  #define module_qcom_smd_driver(__smd_driver) \
  	module_driver(__smd_driver, qcom_smd_driver_register, \
  		      qcom_smd_driver_unregister)
  
- int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len);
  
 +struct qcom_smd_channel *qcom_smd_open_channel(struct qcom_smd_channel *channel,
 +					       const char *name,
 +					       qcom_smd_cb_t cb);
 +
  #endif

^ permalink raw reply

* Re: [PATCH net-next V3 00/10] cls_flower hardware offload support
From: David Miller @ 2016-05-10  1:14 UTC (permalink / raw)
  To: gerlitz.or; +Cc: amir, netdev, john.r.fastabend, saeedm, jiri
In-Reply-To: <CAJ3xEMjB5YRySTviaKzpr432MR61TnBqJdsqs8rBdfS6cSp2Dg@mail.gmail.com>

From: Or Gerlitz <gerlitz.or@gmail.com>
Date: Mon, 9 May 2016 23:31:52 +0300

> Wanted to check with you if such a submission can take place in
> parallel with another net-next mlx5 only submission which is planned
> by the driver team.

One series at a time please.

^ permalink raw reply

* [PATCH] Bluetooth: Fix l2cap_sock_teardown_cb race condition with bt_accept_dequeue
From: Yichen Zhao @ 2016-05-10  1:15 UTC (permalink / raw)
  To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg
  Cc: David S. Miller, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Yichen Zhao

Fix a race condition between l2cap_sock_teardown_cb on an L2CAP socket
and bt_accept_dequeue on its parent socket. When the race condition is
encountered bt_accept_dequeue may call bt_accept_unlink on an already
unlinked socket and result in a NULL pointer dereference.

Even if bt_accept_unlink is not called by bt_accept_dequeue,
bt_accept_unlink called by l2cap_sock_teardown_cb can race with
list_for_each_entry_safe in bt_accept_dequeue, causing the latter to
loop indefinitely on the unlinked socket, until release_sock crashes
with a NULL pointer dereference when the sock pointer is freed.

The race condition is fixed by locking the parent socket in
l2cap_sock_teardown_cb.

[50510.241632] BUG: unable to handle kernel NULL pointer dereference at 00000000000001a8
[50510.241694] IP: [<ffffffffc01243f7>] bt_accept_unlink+0x47/0xa0 [bluetooth]
[50510.241759] PGD 0
[50510.241776] Oops: 0002 [#1] SMP
[50510.241802] Modules linked in: rtl8192cu rtl_usb rtlwifi rtl8192c_common 8021q garp stp mrp llc rfcomm bnep nls_iso8859_1 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp arc4 ath9k ath9k_common ath9k_hw ath kvm eeepc_wmi asus_wmi mac80211 snd_hda_codec_hdmi snd_hda_codec_realtek sparse_keymap crct10dif_pclmul snd_hda_codec_generic crc32_pclmul snd_hda_intel snd_hda_controller cfg80211 snd_hda_codec i915 snd_hwdep snd_pcm ghash_clmulni_intel snd_timer snd soundcore serio_raw cryptd drm_kms_helper drm i2c_algo_bit shpchp ath3k mei_me lpc_ich btusb bluetooth 6lowpan_iphc mei lp parport wmi video mac_hid psmouse ahci libahci r8169 mii
[50510.242279] CPU: 0 PID: 934 Comm: krfcommd Not tainted 3.16.0-49-generic #65~14.04.1-Ubuntu
[50510.242327] Hardware name: ASUSTeK Computer INC. VM40B/VM40B, BIOS 1501 12/09/2014
[50510.242370] task: ffff8800d9068a30 ti: ffff8800d7a54000 task.ti: ffff8800d7a54000
[50510.242413] RIP: 0010:[<ffffffffc01243f7>]  [<ffffffffc01243f7>] bt_accept_unlink+0x47/0xa0 [bluetooth]
[50510.242480] RSP: 0018:ffff8800d7a57d58  EFLAGS: 00010246
[50510.242511] RAX: 0000000000000000 RBX: ffff880119bb8c00 RCX: ffff880119bb8eb0
[50510.242552] RDX: ffff880119bb8eb0 RSI: 00000000fffffe01 RDI: ffff880119bb8c00
[50510.242592] RBP: ffff8800d7a57d60 R08: 0000000000000283 R09: 0000000000000001
[50510.242633] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800d8da9eb0
[50510.242673] R13: ffff8800d74fdb80 R14: ffff880119bb8c00 R15: ffff8800d8da9c00
[50510.242715] FS:  0000000000000000(0000) GS:ffff88011fa00000(0000) knlGS:0000000000000000
[50510.242761] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[50510.242794] CR2: 00000000000001a8 CR3: 0000000001c13000 CR4: 00000000001407f0
[50510.242835] Stack:
[50510.242849]  ffff880119bb8eb0 ffff8800d7a57da0 ffffffffc0124506 ffff8800d8da9eb0
[50510.242899]  ffff8800d8da9c00 ffff8800d9068a30 0000000000000000 ffff8800d74fdb80
[50510.242949]  ffff8800d6f85208 ffff8800d7a57e08 ffffffffc0159985 000000000000001f
[50510.242999] Call Trace:
[50510.243027]  [<ffffffffc0124506>] bt_accept_dequeue+0xb6/0x180 [bluetooth]
[50510.243085]  [<ffffffffc0159985>] l2cap_sock_accept+0x125/0x220 [bluetooth]
[50510.243128]  [<ffffffff810a1b30>] ? wake_up_state+0x20/0x20
[50510.243163]  [<ffffffff8164946e>] kernel_accept+0x4e/0xa0
[50510.243200]  [<ffffffffc05b97cd>] rfcomm_run+0x1ad/0x890 [rfcomm]
[50510.243238]  [<ffffffffc05b9620>] ? rfcomm_process_rx+0x8a0/0x8a0 [rfcomm]
[50510.243281]  [<ffffffff81091572>] kthread+0xd2/0xf0
[50510.243312]  [<ffffffff810914a0>] ? kthread_create_on_node+0x1c0/0x1c0
[50510.243353]  [<ffffffff8176e9d8>] ret_from_fork+0x58/0x90
[50510.243387]  [<ffffffff810914a0>] ? kthread_create_on_node+0x1c0/0x1c0
[50510.243424] Code: 00 48 8b 93 b8 02 00 00 48 8d 83 b0 02 00 00 48 89 51 08 48 89 0a 48 89 83 b0 02 00 00 48 89 83 b8 02 00 00 48 8b 83 c0 02 00 00 <66> 83 a8 a8 01 00 00 01 48 c7 83 c0 02 00 00 00 00 00 00 f0 ff
[50510.243685] RIP  [<ffffffffc01243f7>] bt_accept_unlink+0x47/0xa0 [bluetooth]
[50510.243737]  RSP <ffff8800d7a57d58>
[50510.243758] CR2: 00000000000001a8
[50510.249457] ---[ end trace bb984f932c4e3ab3 ]---

Signed-off-by: Yichen Zhao <zhaoyichen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
---
 net/bluetooth/l2cap_sock.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index e4cae72..ff1c821 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1307,6 +1307,15 @@ static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err)
 
 	BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
 
+	parent = bt_sk(sk)->parent;
+
+	/* The parent sock must be locked if its state is mutated by
+	 * bt_accept_unlink. It must be locked before sk to maintain the same
+	 * locking order as bt_accept_dequeue.
+	 */
+	if (parent)
+		lock_sock_nested(parent, L2CAP_NESTING_PARENT);
+
 	/* This callback can be called both for server (BT_LISTEN)
 	 * sockets as well as "normal" ones. To avoid lockdep warnings
 	 * with child socket locking (through l2cap_sock_cleanup_listen)
@@ -1316,7 +1325,11 @@ static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err)
 	 */
 	lock_sock_nested(sk, atomic_read(&chan->nesting));
 
-	parent = bt_sk(sk)->parent;
+	/* bt_accept_unlink could have been called before locking parent. */
+	if (parent && !bt_sk(sk)->parent) {
+		release_sock(parent);
+		parent = NULL;
+	}
 
 	sock_set_flag(sk, SOCK_ZAPPED);
 
@@ -1348,6 +1361,9 @@ static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err)
 	}
 
 	release_sock(sk);
+
+	if (parent)
+		release_sock(parent);
 }
 
 static void l2cap_sock_state_change_cb(struct l2cap_chan *chan, int state,
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related

* [PATCH 0/3] bridge: netfilter: checkpatch fixes
From: tcharding @ 2016-05-10  1:26 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Tobin C Harding, Pablo Neira Ayuso, David S. Miller,
	netfilter-devel, coreteam, netdev

From: Tobin C Harding <me@tobin.cc>

checkpatch produces 32 'checks'. This patch set amends them all.

Patch one is white space only.
Patch two changes data types e.g uint8_t -> u8.
Patch three amends comparison to null.

Tobin C Harding (3):
  bridge: netfilter: checkpatch whitespace fixes
  bridge: netfilter: checkpatch data type fixes
  bridge: netfilter: checkpatch null comparison fixes

 net/bridge/netfilter/ebt_stp.c | 68 +++++++++++++++++++++---------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

-- 
2.8.2


^ permalink raw reply

* [PATCH 1/3] bridge: netfilter: checkpatch whitespace fixes
From: tcharding @ 2016-05-10  1:26 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Tobin C Harding, Pablo Neira Ayuso, David S. Miller,
	netfilter-devel, coreteam, netdev
In-Reply-To: <1462843618-21914-1-git-send-email-me@tobin.cc>

From: Tobin C Harding <me@tobin.cc>

checkpatch produces various white space 'checks'.

This patch amends them.

Signed-off-by: Tobin C Harding <me@tobin.cc>
---
This is my second linux kernel patch. Unsure if I was meant to cc multiple mailing lists?

thanks

 net/bridge/netfilter/ebt_stp.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 6b731e1..26a0859 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -55,65 +55,65 @@ static bool ebt_filter_config(const struct ebt_stp_info *info,
 	if (info->bitmask & EBT_STP_ROOTPRIO) {
 		v16 = NR16(stpc->root);
 		if (FWINV(v16 < c->root_priol ||
-		    v16 > c->root_priou, EBT_STP_ROOTPRIO))
+			  v16 > c->root_priou, EBT_STP_ROOTPRIO))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_ROOTADDR) {
 		verdict = 0;
 		for (i = 0; i < 6; i++)
-			verdict |= (stpc->root[2+i] ^ c->root_addr[i]) &
-				   c->root_addrmsk[i];
+			verdict |= (stpc->root[2 + i] ^ c->root_addr[i]) &
+				c->root_addrmsk[i];
 		if (FWINV(verdict != 0, EBT_STP_ROOTADDR))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_ROOTCOST) {
 		v32 = NR32(stpc->root_cost);
 		if (FWINV(v32 < c->root_costl ||
-		    v32 > c->root_costu, EBT_STP_ROOTCOST))
+			  v32 > c->root_costu, EBT_STP_ROOTCOST))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_SENDERPRIO) {
 		v16 = NR16(stpc->sender);
 		if (FWINV(v16 < c->sender_priol ||
-		    v16 > c->sender_priou, EBT_STP_SENDERPRIO))
+			  v16 > c->sender_priou, EBT_STP_SENDERPRIO))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_SENDERADDR) {
 		verdict = 0;
 		for (i = 0; i < 6; i++)
-			verdict |= (stpc->sender[2+i] ^ c->sender_addr[i]) &
-				   c->sender_addrmsk[i];
+			verdict |= (stpc->sender[2 + i] ^ c->sender_addr[i]) &
+				c->sender_addrmsk[i];
 		if (FWINV(verdict != 0, EBT_STP_SENDERADDR))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_PORT) {
 		v16 = NR16(stpc->port);
 		if (FWINV(v16 < c->portl ||
-		    v16 > c->portu, EBT_STP_PORT))
+			  v16 > c->portu, EBT_STP_PORT))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_MSGAGE) {
 		v16 = NR16(stpc->msg_age);
 		if (FWINV(v16 < c->msg_agel ||
-		    v16 > c->msg_ageu, EBT_STP_MSGAGE))
+			  v16 > c->msg_ageu, EBT_STP_MSGAGE))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_MAXAGE) {
 		v16 = NR16(stpc->max_age);
 		if (FWINV(v16 < c->max_agel ||
-		    v16 > c->max_ageu, EBT_STP_MAXAGE))
+			  v16 > c->max_ageu, EBT_STP_MAXAGE))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_HELLOTIME) {
 		v16 = NR16(stpc->hello_time);
 		if (FWINV(v16 < c->hello_timel ||
-		    v16 > c->hello_timeu, EBT_STP_HELLOTIME))
+			  v16 > c->hello_timeu, EBT_STP_HELLOTIME))
 			return false;
 	}
 	if (info->bitmask & EBT_STP_FWDD) {
 		v16 = NR16(stpc->forward_delay);
 		if (FWINV(v16 < c->forward_delayl ||
-		    v16 > c->forward_delayu, EBT_STP_FWDD))
+			  v16 > c->forward_delayu, EBT_STP_FWDD))
 			return false;
 	}
 	return true;
-- 
2.8.2


^ permalink raw reply related

* [PATCH 3/3] bridge: netfilter: checkpatch null comparison fixes
From: tcharding @ 2016-05-10  1:26 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Tobin C Harding, Pablo Neira Ayuso, David S. Miller,
	netfilter-devel, coreteam, netdev
In-Reply-To: <1462843618-21914-1-git-send-email-me@tobin.cc>

From: Tobin C Harding <me@tobin.cc>

checkpatch produces comparison to null 'checks'.

This patch amends them.

Signed-off-by: Tobin C Harding <me@tobin.cc>
---
 net/bridge/netfilter/ebt_stp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 9df943f..677904f 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -128,7 +128,7 @@ ebt_stp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 	const u8 header[6] = {0x42, 0x42, 0x03, 0x00, 0x00, 0x00};
 
 	sp = skb_header_pointer(skb, 0, sizeof(_stph), &_stph);
-	if (sp == NULL)
+	if (!sp)
 		return false;
 
 	/* The stp code only considers these */
@@ -146,7 +146,7 @@ ebt_stp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 
 		st = skb_header_pointer(skb, sizeof(_stph),
 					sizeof(_stpc), &_stpc);
-		if (st == NULL)
+		if (!st)
 			return false;
 		return ebt_filter_config(info, st);
 	}
-- 
2.8.2


^ permalink raw reply related

* [PATCH 2/3] bridge: netfilter: checkpatch data type fixes
From: tcharding @ 2016-05-10  1:26 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Tobin C Harding, Pablo Neira Ayuso, David S. Miller,
	netfilter-devel, coreteam, netdev
In-Reply-To: <1462843618-21914-1-git-send-email-me@tobin.cc>

From: Tobin C Harding <me@tobin.cc>

checkpatch produces data type 'checks'.

This patch amends them by changing, for example:
uint8_t -> u8

Signed-off-by: Tobin C Harding <me@tobin.cc>
---
 net/bridge/netfilter/ebt_stp.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
index 26a0859..9df943f 100644
--- a/net/bridge/netfilter/ebt_stp.c
+++ b/net/bridge/netfilter/ebt_stp.c
@@ -17,24 +17,24 @@
 #define BPDU_TYPE_TCN 0x80
 
 struct stp_header {
-	uint8_t dsap;
-	uint8_t ssap;
-	uint8_t ctrl;
-	uint8_t pid;
-	uint8_t vers;
-	uint8_t type;
+	u8 dsap;
+	u8 ssap;
+	u8 ctrl;
+	u8 pid;
+	u8 vers;
+	u8 type;
 };
 
 struct stp_config_pdu {
-	uint8_t flags;
-	uint8_t root[8];
-	uint8_t root_cost[4];
-	uint8_t sender[8];
-	uint8_t port[2];
-	uint8_t msg_age[2];
-	uint8_t max_age[2];
-	uint8_t hello_time[2];
-	uint8_t forward_delay[2];
+	u8 flags;
+	u8 root[8];
+	u8 root_cost[4];
+	u8 sender[8];
+	u8 port[2];
+	u8 msg_age[2];
+	u8 max_age[2];
+	u8 hello_time[2];
+	u8 forward_delay[2];
 };
 
 #define NR16(p) (p[0] << 8 | p[1])
@@ -44,8 +44,8 @@ static bool ebt_filter_config(const struct ebt_stp_info *info,
 			      const struct stp_config_pdu *stpc)
 {
 	const struct ebt_stp_config_info *c;
-	uint16_t v16;
-	uint32_t v32;
+	u16 v16;
+	u32 v32;
 	int verdict, i;
 
 	c = &info->config;
@@ -125,7 +125,7 @@ ebt_stp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 	const struct ebt_stp_info *info = par->matchinfo;
 	const struct stp_header *sp;
 	struct stp_header _stph;
-	const uint8_t header[6] = {0x42, 0x42, 0x03, 0x00, 0x00, 0x00};
+	const u8 header[6] = {0x42, 0x42, 0x03, 0x00, 0x00, 0x00};
 
 	sp = skb_header_pointer(skb, 0, sizeof(_stph), &_stph);
 	if (sp == NULL)
@@ -156,8 +156,8 @@ ebt_stp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 static int ebt_stp_mt_check(const struct xt_mtchk_param *par)
 {
 	const struct ebt_stp_info *info = par->matchinfo;
-	const uint8_t bridge_ula[6] = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x00};
-	const uint8_t msk[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+	const u8 bridge_ula[6] = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x00};
+	const u8 msk[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 	const struct ebt_entry *e = par->entryinfo;
 
 	if (info->bitmask & ~EBT_STP_MASK || info->invflags & ~EBT_STP_MASK ||
-- 
2.8.2

^ permalink raw reply related

* linux-next: build failure after merge of the net-next tree
From: Stephen Rothwell @ 2016-05-10  1:29 UTC (permalink / raw)
  To: David Miller, netdev, Olof Johansson, Arnd Bergmann,
	linux-arm-kernel
  Cc: linux-next, linux-kernel, Bjorn Andersson, Andy Gross

Hi all,

After merging the net-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

net/qrtr/smd.c:106:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .callback = qcom_smd_qrtr_callback,
              ^
net/qrtr/smd.c:106:14: note: (near initialization for 'qcom_smd_qrtr_driver.callback')

Caused by commit

  bdabad3e363d ("net: Add Qualcomm IPC router")

interacting with commit

  b853cb9628bf ("soc: qcom: smd: Make callback pass channel reference")

from the arm-soc tree.

I added the following merge fix patch (and it turned out I needed the
new stubs).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 10 May 2016 11:14:06 +1000
Subject: [PATCH] soc: qcom: smd: fix for Qualcomm IPC router and callback API
 change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/soc/qcom/smd.h | 9 +++++++++
 net/qrtr/smd.c               | 9 ++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h
index 086e36d76be9..fbebbfc82ed3 100644
--- a/include/linux/soc/qcom/smd.h
+++ b/include/linux/soc/qcom/smd.h
@@ -70,6 +70,15 @@ static inline void qcom_smd_driver_unregister(struct qcom_smd_driver *drv)
 	WARN_ON(1);
 }
 
+static inline void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel)
+{
+	return NULL;
+}
+
+static inline void qcom_smd_set_drvdata(struct qcom_smd_channel *channel, void *data)
+{
+}
+
 static inline int qcom_smd_send(struct qcom_smd_channel *channel,
 				const void *data, int len)
 {
diff --git a/net/qrtr/smd.c b/net/qrtr/smd.c
index 84ebce73aa23..0d11132b3370 100644
--- a/net/qrtr/smd.c
+++ b/net/qrtr/smd.c
@@ -21,13 +21,14 @@
 struct qrtr_smd_dev {
 	struct qrtr_endpoint ep;
 	struct qcom_smd_channel *channel;
+	struct device *dev;
 };
 
 /* from smd to qrtr */
-static int qcom_smd_qrtr_callback(struct qcom_smd_device *sdev,
+static int qcom_smd_qrtr_callback(struct qcom_smd_channel *channel,
 				  const void *data, size_t len)
 {
-	struct qrtr_smd_dev *qdev = dev_get_drvdata(&sdev->dev);
+	struct qrtr_smd_dev *qdev = qcom_smd_get_drvdata(channel);
 	int rc;
 
 	if (!qdev)
@@ -35,7 +36,7 @@ static int qcom_smd_qrtr_callback(struct qcom_smd_device *sdev,
 
 	rc = qrtr_endpoint_post(&qdev->ep, data, len);
 	if (rc == -EINVAL) {
-		dev_err(&sdev->dev, "invalid ipcrouter packet\n");
+		dev_err(qdev->dev, "invalid ipcrouter packet\n");
 		/* return 0 to let smd drop the packet */
 		rc = 0;
 	}
@@ -73,12 +74,14 @@ static int qcom_smd_qrtr_probe(struct qcom_smd_device *sdev)
 		return -ENOMEM;
 
 	qdev->channel = sdev->channel;
+	qdev->dev = &sdev->dev;
 	qdev->ep.xmit = qcom_smd_qrtr_send;
 
 	rc = qrtr_endpoint_register(&qdev->ep, QRTR_EP_NID_AUTO);
 	if (rc)
 		return rc;
 
+	qcom_smd_set_drvdata(sdev->channel, qdev);
 	dev_set_drvdata(&sdev->dev, qdev);
 
 	dev_dbg(&sdev->dev, "Qualcomm SMD QRTR driver probed\n");
-- 
2.7.0

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related

* linux-next: build failure after merge of the net-next tree
From: Stephen Rothwell @ 2016-05-10  1:29 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel

Hi all,

After merging the net-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:37:0:
drivers/net/ethernet/mellanox/mlx5/core/en.h:525:29: error: field 'fts' has incomplete type
  struct mlx5e_flow_tables   fts;   
                             ^
drivers/net/ethernet/mellanox/mlx5/core/en.h:526:29: error: field 'eth_addr' has incomplete type
  struct mlx5e_eth_addr_db   eth_addr;
                             ^
drivers/net/ethernet/mellanox/mlx5/core/en.h:527:29: error: field 'vlan' has incomplete type
  struct mlx5e_vlan_db       vlan;  
                             ^
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_fs.c:38:0:
drivers/net/ethernet/mellanox/mlx5/core/en.h:525:29: error: field 'fts' has incomplete type
  struct mlx5e_flow_tables   fts;   
                             ^
drivers/net/ethernet/mellanox/mlx5/core/en.h:526:29: error: field 'eth_addr' has incomplete type
  struct mlx5e_eth_addr_db   eth_addr;
                             ^
drivers/net/ethernet/mellanox/mlx5/core/en.h:527:29: error: field 'vlan' has incomplete type
  struct mlx5e_vlan_db       vlan;  
                             ^
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:33:0:
drivers/net/ethernet/mellanox/mlx5/core/en.h:525:29: error: field 'fts' has incomplete type
  struct mlx5e_flow_tables   fts;   
                             ^
drivers/net/ethernet/mellanox/mlx5/core/en.h:526:29: error: field 'eth_addr' has incomplete type
  struct mlx5e_eth_addr_db   eth_addr;
                             ^
drivers/net/ethernet/mellanox/mlx5/core/en.h:527:29: error: field 'vlan' has incomplete type
  struct mlx5e_vlan_db       vlan;  
                             ^
drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2619:0: error: unterminated #ifdef
 #ifdef CONFIG_MLX5_CORE_EN_VXLAN   
 ^

Caused by commit

  e800072c18f0 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")

which seems to have reversed some of the merge fixes in commit

  cba653210056 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")

But I am not reaaly sure what has happened here :-(

I tried to use the net-next tree from next-20160509 but that now has
conflicts agains other changes, so I applied the following fix patch
for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 10 May 2016 11:20:23 +1000
Subject: [PATCH] net-next: fix bad merge

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/mellanox/mlx5/core/en.h      | 3 ---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index 7aea32e085b3..19b1b021af2d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -522,9 +522,6 @@ struct mlx5e_priv {
 	struct mlx5e_direct_tir    direct_tir[MLX5E_MAX_NUM_CHANNELS];
 
 	struct mlx5e_flow_steering fs;
-	struct mlx5e_flow_tables   fts;
-	struct mlx5e_eth_addr_db   eth_addr;
-	struct mlx5e_vlan_db       vlan;
 #ifdef CONFIG_MLX5_CORE_EN_VXLAN
 	struct mlx5e_vxlan_db      vxlan;
 #endif
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index b60a1bc6f457..98be1ce3afd8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -2620,6 +2620,7 @@ static const struct net_device_ops mlx5e_netdev_ops_sriov = {
 	.ndo_add_vxlan_port      = mlx5e_add_vxlan_port,
 	.ndo_del_vxlan_port      = mlx5e_del_vxlan_port,
 	.ndo_features_check      = mlx5e_features_check,
+#endif
 #ifdef CONFIG_RFS_ACCEL
 	.ndo_rx_flow_steer	 = mlx5e_rx_flow_steer,
 #endif
-- 
2.7.0

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related

* RE: [PATCH] igb: adjust ptp timestamps for tx/rx latency
From: Brown, Aaron F @ 2016-05-10  1:31 UTC (permalink / raw)
  To: Nathan Sullivan, Kirsher, Jeffrey T, Brandeburg, Jesse,
	Nelson, Shannon, Wyborny, Carolyn, Skidmore, Donald C,
	Allan, Bruce W, Ronciak, John, Williams, Mitch A
  Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1462317056-28805-1-git-send-email-nathan.sullivan@ni.com>

> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Nathan Sullivan
> Sent: Tuesday, May 3, 2016 4:11 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Brandeburg, Jesse
> <jesse.brandeburg@intel.com>; Nelson, Shannon
> <shannon.nelson@intel.com>; Wyborny, Carolyn
> <carolyn.wyborny@intel.com>; Skidmore, Donald C
> <donald.c.skidmore@intel.com>; Allan, Bruce W <bruce.w.allan@intel.com>;
> Ronciak, John <john.ronciak@intel.com>; Williams, Mitch A
> <mitch.a.williams@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; Nathan Sullivan <nathan.sullivan@ni.com>
> Subject: [PATCH] igb: adjust ptp timestamps for tx/rx latency
> 
> Table 7-62 on page 338 of the i210 datasheet lists TX and RX latencies
> for the various speeds the chip supports.  To give better ptp timestamp
> accuracy, adjust the timestamps by the amounts Intel gives based on
> current link speed.
> 
> Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
> ---
>  drivers/net/ethernet/intel/igb/igb.h     |    8 +++++++
>  drivers/net/ethernet/intel/igb/igb_ptp.c |   36
> ++++++++++++++++++++++++++++++
>  2 files changed, 44 insertions(+)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply

* Re: linux-next: build failure after merge of the net-next tree
From: David Miller @ 2016-05-10  1:32 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel
In-Reply-To: <20160510112914.08f1a497@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 10 May 2016 11:29:14 +1000

> Caused by commit
> 
>   e800072c18f0 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
> 
> which seems to have reversed some of the merge fixes in commit
> 
>   cba653210056 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
> 
> But I am not reaaly sure what has happened here :-(
> 
> I tried to use the net-next tree from next-20160509 but that now has
> conflicts agains other changes, so I applied the following fix patch
> for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 10 May 2016 11:20:23 +1000
> Subject: [PATCH] net-next: fix bad merge
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Thanks Stephen, I'll try to sort this out.

^ permalink raw reply

* [PATCH net-next] fjes: Fix unnecessary spinlock_irqsave
From: Taku Izumi @ 2016-05-10  1:28 UTC (permalink / raw)
  To: netdev, davem; +Cc: isimatu.yasuaki, Taku Izumi

commit-bd5a256 introduces a deadlock bug in fjes_change_mtu().
This spin_lock_irqsave() is obviously unnecessary.

This patch eliminates unnecessary spin_lock_irqsave() in
fjes_change_mtu()

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
 drivers/net/fjes/fjes_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index f4e6926..86c331b 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -819,7 +819,6 @@ static int fjes_change_mtu(struct net_device *netdev, int new_mtu)
 	netdev->mtu = new_mtu;
 
 	if (running) {
-		spin_lock_irqsave(&hw->rx_status_lock, flags);
 		for (epidx = 0; epidx < hw->max_epid; epidx++) {
 			if (epidx == hw->my_epid)
 				continue;
-- 
1.9.1

^ permalink raw reply related

* Re: linux-next: build failure after merge of the net-next tree
From: Andy Gross @ 2016-05-10  1:52 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, Olof Johansson, Arnd Bergmann,
	linux-arm-kernel, linux-next, Linux Kernel list, Bjorn Andersson
In-Reply-To: <20160510112905.5bffcad8@canb.auug.org.au>

On 9 May 2016 at 20:29, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the net-next tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> net/qrtr/smd.c:106:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>   .callback = qcom_smd_qrtr_callback,
>               ^
> net/qrtr/smd.c:106:14: note: (near initialization for 'qcom_smd_qrtr_driver.callback')
>
> Caused by commit
>
>   bdabad3e363d ("net: Add Qualcomm IPC router")
>
> interacting with commit
>
>   b853cb9628bf ("soc: qcom: smd: Make callback pass channel reference")
>
> from the arm-soc tree.
>
> I added the following merge fix patch (and it turned out I needed the
> new stubs).

Thanks for fixing this up.  I'll work with Bjorn to get this resolved.
I'll have something up for tomorrow's next pull.


Regards,

Andy Gross

^ permalink raw reply

* Re: [PATCH net-next] fjes: Fix unnecessary spinlock_irqsave
From: David Miller @ 2016-05-10  2:06 UTC (permalink / raw)
  To: izumi.taku; +Cc: netdev, isimatu.yasuaki
In-Reply-To: <1462843729-32414-1-git-send-email-izumi.taku@jp.fujitsu.com>

From: Taku Izumi <izumi.taku@jp.fujitsu.com>
Date: Tue, 10 May 2016 10:28:49 +0900

> commit-bd5a256 introduces a deadlock bug in fjes_change_mtu().
> This spin_lock_irqsave() is obviously unnecessary.
> 
> This patch eliminates unnecessary spin_lock_irqsave() in
> fjes_change_mtu()
> 
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next v2 0/2] net: l3mdev: Allow send on enslaved interface
From: David Miller @ 2016-05-10  2:34 UTC (permalink / raw)
  To: dsa; +Cc: netdev
In-Reply-To: <1462664940-26678-1-git-send-email-dsa@cumulusnetworks.com>

From: David Ahern <dsa@cumulusnetworks.com>
Date: Sat,  7 May 2016 16:48:58 -0700

> First patch preps for the second. The second is required for several use
> cases such as ping on an interface and BFD that need to send packets on
> a specific interface, including ones enslaved to a VRF device.
> 
> v2
> - fixed brackets on both patches per comment from DaveM

Series applied.

^ permalink raw reply

* Re: [PATCH net-next v3 1/2] net: l3mdev: Add hook in ip and ipv6
From: David Miller @ 2016-05-10  2:39 UTC (permalink / raw)
  To: dsa; +Cc: netdev
In-Reply-To: <1462681005-25959-2-git-send-email-dsa@cumulusnetworks.com>

From: David Ahern <dsa@cumulusnetworks.com>
Date: Sat,  7 May 2016 21:16:44 -0700

> +static inline
> +struct sk_buff *l3mdev_l3_rcv(struct sk_buff *skb, u16 proto)
> +{
> +	struct net_device *master = NULL;
> +
> +	if (netif_is_l3_slave(skb->dev))
> +		master = netdev_master_upper_dev_get_rcu(skb->dev);
> +
> +	else if (netif_is_l3_master(skb->dev))
> +		master = skb->dev;

Please no empty line between if and else if clauses.

^ permalink raw reply

* Re: [PATCH net-next] stmmac: dwmac-socfpga: make socfpga_dwmac_pm_ops static
From: David Miller @ 2016-05-10  2:40 UTC (permalink / raw)
  To: manabian; +Cc: netdev, peppe.cavallaro, dinguyen
In-Reply-To: <1462708043-8486-1-git-send-email-manabian@gmail.com>

From: Joachim Eastwood <manabian@gmail.com>
Date: Sun,  8 May 2016 13:47:23 +0200

> Fix the following sparse warning:
> drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:274:1: warning:
>   symbol 'socfpga_dwmac_pm_ops' was not declared. Should it be static?
> 
> Signed-off-by: Joachim Eastwood <manabian@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] fix a kernel infoleak in x25 module
From: David Miller @ 2016-05-10  2:47 UTC (permalink / raw)
  To: kangjielu
  Cc: andrew.hendry, linux-x25, netdev, linux-kernel, taesoo, insu,
	csong84, kjlu
In-Reply-To: <1462723814-14732-1-git-send-email-kjlu@gatech.edu>

From: Kangjie Lu <kangjielu@gmail.com>
Date: Sun,  8 May 2016 12:10:14 -0400

> Stack object "dte_facilities" is allocated in x25_rx_call_request(),
> which is supposed to be initialized in x25_negotiate_facilities.
> However, 5 fields (8 bytes in total) are not initialized. This
> object is then copied to userland via copy_to_user, thus infoleak
> occurs.
> 
> Signed-off-by: Kangjie Lu <kjlu@gatech.edu>

Applied and queued up for -stable thanks.

Please start formatting your Subject lines properly, I've been fixing
all of them up by hand.

You should specify a subsystem name prefix, then a ":" character, then
a space, then a description of your change.  For example, for this
patch an appropriate Subject would have been:

	[PATCH] x25: Fix a kernel infoleak in x25_negotiate_facilities().

Thanks.

^ permalink raw reply

* [RESEND PATCH v7 21/21] MAINTAINERS: Add maintainers for HiSilicon RoCE driver
From: Lijun Ou @ 2016-05-10  3:04 UTC (permalink / raw)
  To: dledford, sean.hefty, hal.rosenstock, davem, jeffrey.t.kirsher,
	jiri, ogerlitz
  Cc: linux-rdma, linux-kernel, netdev, gongyangming, xiaokun,
	tangchaofei, oulijun, haifeng.wei, yisen.zhuang, yankejian,
	charles.chenxin, linuxarm
In-Reply-To: <1462849483-67927-1-git-send-email-oulijun@huawei.com>

This patch added maintainers for RoCE driver.

Signed-off-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 MAINTAINERS | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index ecbb2f6..51658a2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10012,6 +10012,14 @@ W:	http://www.emulex.com
 S:	Supported
 F:	drivers/infiniband/hw/ocrdma/
 
+HISILICON ROCE DRIVER
+M:	Wei Hu(Xavier) <xavier.huwei@huawei.com>
+M:	Lijun Ou <oulijun@huawei.com>
+L:	linux-rdma@vger.kernel.org
+S:	Maintained
+F:	drivers/infiniband/hw/hns/
+F:	Documentation/devicetree/bindings/infiniband/hisilicon-hns-roce.txt
+
 SFC NETWORK DRIVER
 M:	Solarflare linux maintainers <linux-net-drivers@solarflare.com>
 M:	Edward Cree <ecree@solarflare.com>
-- 
1.9.1

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox