Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 1/3] kbuild: remove unnecessary "obj- := dummy.o" trick
From: Simon Horman @ 2014-09-09 23:45 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Masahiro Yamada, linux-kbuild, Ben Dooks, Kukjin Kim,
	Russell King, Laurent Pinchart, Geert Uytterhoeven, Wolfram Sang,
	Takashi Yoshii, Ulrich Hecht, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, netdev
In-Reply-To: <20140909174337.19023.97772@quantum>

On Tue, Sep 09, 2014 at 10:43:37AM -0700, Mike Turquette wrote:
> Quoting Masahiro Yamada (2014-09-09 03:26:19)
> > In these Makefiles, at least one of "obj-y" and "obj-" is non-empty,
> > hence built-in.o is always created without such a trick.
> > 
> > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> 
> Acked-by: Mike Turquette <mturquette@linaro.org>

shmobile portion:

Acked-by: Simon Horman <horms+renesas@verge.net.au>

> 
> > ---
> > 
> >  arch/arm/plat-samsung/Makefile | 1 -
> >  drivers/clk/shmobile/Makefile  | 2 --
> >  drivers/net/wimax/Makefile     | 4 ----
> >  3 files changed, 7 deletions(-)
> > 
> > diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
> > index 5fe1750..a402262 100644
> > --- a/arch/arm/plat-samsung/Makefile
> > +++ b/arch/arm/plat-samsung/Makefile
> > @@ -8,7 +8,6 @@ ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include
> >  
> >  obj-y                          :=
> >  obj-m                          :=
> > -obj-n                          := dummy.o
> >  obj-                           :=
> >  
> >  # Objects we always build independent of SoC choice
> > diff --git a/drivers/clk/shmobile/Makefile b/drivers/clk/shmobile/Makefile
> > index e002923..9aab51c8 100644
> > --- a/drivers/clk/shmobile/Makefile
> > +++ b/drivers/clk/shmobile/Makefile
> > @@ -6,5 +6,3 @@ obj-$(CONFIG_ARCH_R8A7790)              += clk-rcar-gen2.o
> >  obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o
> >  obj-$(CONFIG_ARCH_SHMOBILE_MULTI)      += clk-div6.o
> >  obj-$(CONFIG_ARCH_SHMOBILE_MULTI)      += clk-mstp.o
> > -# for emply built-in.o
> > -obj-n  := dummy
> > diff --git a/drivers/net/wimax/Makefile b/drivers/net/wimax/Makefile
> > index 992bc02..692184d 100644
> > --- a/drivers/net/wimax/Makefile
> > +++ b/drivers/net/wimax/Makefile
> > @@ -1,5 +1 @@
> > -
> >  obj-$(CONFIG_WIMAX_I2400M)     += i2400m/
> > -
> > -# (from Sam Ravnborg) force kbuild to create built-in.o
> > -obj- := dummy.o
> > -- 
> > 1.9.1
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply

* Re: [PATCH net-next] sfc: Convert the normal transmit complete path to dev_consume_skb_any()
From: David Miller @ 2014-09-09 23:46 UTC (permalink / raw)
  To: rick.jones2; +Cc: eric.dumazet, raj, netdev, sshah, linux-net-drivers
In-Reply-To: <540F8F78.9020502@hp.com>

From: Rick Jones <rick.jones2@hp.com>
Date: Tue, 09 Sep 2014 16:38:32 -0700

> But perhaps someone from SolarFlare can say why that was a const to
> begin with.

Probably to trap skb->x modifications after the SKB has been placed
in these entries, except for these explicit spots where the casts
are applied.

^ permalink raw reply

* Re: Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
From: Andres Freund @ 2014-09-09 23:48 UTC (permalink / raw)
  To: Cong Wang
  Cc: Alexander Y. Fomichev, David Miller, Linus Torvalds,
	Andrew Morton, netdev, linux-kernel@vger.kernel.org
In-Reply-To: <CAHA+R7NCwhMaWX0Mhr7AqHH4x5RZ6TEEiJB7906yVzQouXD3Lg@mail.gmail.com>

On 2014-09-09 15:43:55 -0700, Cong Wang wrote:
> On Mon, Sep 8, 2014 at 2:25 PM, Andres Freund <andres@anarazel.de> wrote:
> > Hi,
> >
> > (don't have netdev archived, thus answering here, sorry)
> >
> > On 2014-09-07 16:41:09 -0700, David Miller wrote:
> >> Alexander Y. Fomichev (1):
> >>       net: prevent of emerging cross-namespace symlinks
> >
> 
> Since you are quoting this change, are you saying it causes
> the following kernel warning?

I thought it might be a likely candidate; but I'm not sure at all. I'll
verify it as soon as I can reboot the machine a couple of times (end of
week-ish).

> > I'm seeing WARNINGs like:
> > [ 1005.269134] ------------[ cut here ]------------
> > [ 1005.269148] WARNING: CPU: 6 PID: 4213 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x80()
> > [ 1005.269150] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0'
> 
> 
> Is there a network device named upper_mv-eth0 existed in your system
> before you created macvlan?

No, there wasn't any. Afaics, the sequence is:
1) macvlan mv-eth0 is created in global namespace
2) mv-eth0 is moved (by systemd-nsspawn) into a new network
   namespace. Leaving a dangling symlink in the host namespace
/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0 pointing toward
../mv-eth0
which doesn't exist in the external namespace. The new namespace seems
to have broken 'lower_bond0' symlink as well

This seems to be the case (and probably the actual root cause) in
slightly earlier kernels as well.
What changed seems to be that:
3) macvlan mv-eth0 is destroyed in the namespace (potentially while
   tearing it down)
4) Now there's a broken symlink that doesn't make sense in any namespace
5) mv-eth0 can't be created anew

It seems that 3-5 didn't happen that way on older kernels. The most
recent where it's not persistently broken is 3.16.0-rc7-00007 -
31dab719f. The oldest where I know it's reproducible is
3.17.0-rc4-andres-00135-g35af256.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

^ permalink raw reply

* [Patch net-next 0/5] ipv6: clean up locking in anycast and mcast
From: Cong Wang @ 2014-09-09 23:52 UTC (permalink / raw)
  To: netdev; +Cc: Hannes Frederic Sowa, Hideaki YOSHIFUJI, David S. Miller,
	Cong Wang

This patchset cleans up the locking in anycast.c and mcast.c.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Cong Wang (5):
  ipv6: drop useless rcu_read_lock() in anycast
  ipv6: remove ipv6_sk_ac_lock
  ipv6: clean up ipv6_dev_ac_inc()
  ipv6: drop ipv6_sk_mc_lock in mcast
  ipv6: drop some rcu_read_lock in mcast

 include/linux/netdevice.h |  4 ++--
 include/net/addrconf.h    |  2 +-
 net/core/dev.c            | 14 +++++++------
 net/ipv6/addrconf.c       |  2 +-
 net/ipv6/anycast.c        | 52 +++++++++++++----------------------------------
 net/ipv6/mcast.c          | 35 ++++++-------------------------
 6 files changed, 32 insertions(+), 77 deletions(-)

-- 
1.8.3.1

^ permalink raw reply

* [Patch net-next 1/5] ipv6: drop useless rcu_read_lock() in anycast
From: Cong Wang @ 2014-09-09 23:52 UTC (permalink / raw)
  To: netdev; +Cc: Hannes Frederic Sowa, Hideaki YOSHIFUJI, David S. Miller,
	Cong Wang
In-Reply-To: <1410306738-18036-1-git-send-email-xiyou.wangcong@gmail.com>

These code is now protected by rtnl lock, rcu read lock
is useless now.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 include/linux/netdevice.h |  4 ++--
 net/core/dev.c            | 14 ++++++++------
 net/ipv6/anycast.c        | 18 ++++++------------
 3 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ba72f6b..17e640a 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2083,8 +2083,8 @@ void __dev_remove_pack(struct packet_type *pt);
 void dev_add_offload(struct packet_offload *po);
 void dev_remove_offload(struct packet_offload *po);
 
-struct net_device *dev_get_by_flags_rcu(struct net *net, unsigned short flags,
-					unsigned short mask);
+struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,
+				      unsigned short mask);
 struct net_device *dev_get_by_name(struct net *net, const char *name);
 struct net_device *dev_get_by_name_rcu(struct net *net, const char *name);
 struct net_device *__dev_get_by_name(struct net *net, const char *name);
diff --git a/net/core/dev.c b/net/core/dev.c
index 3c6a967..2595f07 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -897,23 +897,25 @@ struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type)
 EXPORT_SYMBOL(dev_getfirstbyhwtype);
 
 /**
- *	dev_get_by_flags_rcu - find any device with given flags
+ *	__dev_get_by_flags - find any device with given flags
  *	@net: the applicable net namespace
  *	@if_flags: IFF_* values
  *	@mask: bitmask of bits in if_flags to check
  *
  *	Search for any interface with the given flags. Returns NULL if a device
  *	is not found or a pointer to the device. Must be called inside
- *	rcu_read_lock(), and result refcount is unchanged.
+ *	rtnl_lock(), and result refcount is unchanged.
  */
 
-struct net_device *dev_get_by_flags_rcu(struct net *net, unsigned short if_flags,
-				    unsigned short mask)
+struct net_device *__dev_get_by_flags(struct net *net, unsigned short if_flags,
+				      unsigned short mask)
 {
 	struct net_device *dev, *ret;
 
+	ASSERT_RTNL();
+
 	ret = NULL;
-	for_each_netdev_rcu(net, dev) {
+	for_each_netdev(net, dev) {
 		if (((dev->flags ^ if_flags) & mask) == 0) {
 			ret = dev;
 			break;
@@ -921,7 +923,7 @@ struct net_device *dev_get_by_flags_rcu(struct net *net, unsigned short if_flags
 	}
 	return ret;
 }
-EXPORT_SYMBOL(dev_get_by_flags_rcu);
+EXPORT_SYMBOL(__dev_get_by_flags);
 
 /**
  *	dev_valid_name - check if name is okay for network device
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index ff2de7d..3b0429b 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -78,7 +78,6 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 	pac->acl_addr = *addr;
 
 	rtnl_lock();
-	rcu_read_lock();
 	if (ifindex == 0) {
 		struct rt6_info *rt;
 
@@ -91,11 +90,11 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 			goto error;
 		} else {
 			/* router, no matching interface: just pick one */
-			dev = dev_get_by_flags_rcu(net, IFF_UP,
-						   IFF_UP | IFF_LOOPBACK);
+			dev = __dev_get_by_flags(net, IFF_UP,
+						 IFF_UP | IFF_LOOPBACK);
 		}
 	} else
-		dev = dev_get_by_index_rcu(net, ifindex);
+		dev = __dev_get_by_index(net, ifindex);
 
 	if (dev == NULL) {
 		err = -ENODEV;
@@ -137,7 +136,6 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 	}
 
 error:
-	rcu_read_unlock();
 	rtnl_unlock();
 	if (pac)
 		sock_kfree_s(sk, pac, sizeof(*pac));
@@ -174,11 +172,9 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 	spin_unlock_bh(&ipv6_sk_ac_lock);
 
 	rtnl_lock();
-	rcu_read_lock();
-	dev = dev_get_by_index_rcu(net, pac->acl_ifindex);
+	dev = __dev_get_by_index(net, pac->acl_ifindex);
 	if (dev)
 		ipv6_dev_ac_dec(dev, &pac->acl_addr);
-	rcu_read_unlock();
 	rtnl_unlock();
 
 	sock_kfree_s(sk, pac, sizeof(*pac));
@@ -203,12 +199,11 @@ void ipv6_sock_ac_close(struct sock *sk)
 
 	prev_index = 0;
 	rtnl_lock();
-	rcu_read_lock();
 	while (pac) {
 		struct ipv6_ac_socklist *next = pac->acl_next;
 
 		if (pac->acl_ifindex != prev_index) {
-			dev = dev_get_by_index_rcu(net, pac->acl_ifindex);
+			dev = __dev_get_by_index(net, pac->acl_ifindex);
 			prev_index = pac->acl_ifindex;
 		}
 		if (dev)
@@ -216,7 +211,6 @@ void ipv6_sock_ac_close(struct sock *sk)
 		sock_kfree_s(sk, pac, sizeof(*pac));
 		pac = next;
 	}
-	rcu_read_unlock();
 	rtnl_unlock();
 }
 
@@ -341,7 +335,7 @@ int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr)
 	return 0;
 }
 
-/* called with rcu_read_lock() */
+/* called with rtnl_lock() */
 static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr)
 {
 	struct inet6_dev *idev = __in6_dev_get(dev);
-- 
1.8.3.1

^ permalink raw reply related

* [Patch net-next 2/5] ipv6: remove ipv6_sk_ac_lock
From: Cong Wang @ 2014-09-09 23:52 UTC (permalink / raw)
  To: netdev; +Cc: Hannes Frederic Sowa, Hideaki YOSHIFUJI, David S. Miller,
	Cong Wang
In-Reply-To: <1410306738-18036-1-git-send-email-xiyou.wangcong@gmail.com>

Just move rtnl lock up, so that the anycast list can be protected
by rtnl lock now.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/ipv6/anycast.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 3b0429b..d10f2e2 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -46,10 +46,6 @@
 
 static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr);
 
-/* Big ac list lock for all the sockets */
-static DEFINE_SPINLOCK(ipv6_sk_ac_lock);
-
-
 /*
  *	socket join an anycast group
  */
@@ -128,10 +124,8 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 
 	err = ipv6_dev_ac_inc(dev, addr);
 	if (!err) {
-		spin_lock_bh(&ipv6_sk_ac_lock);
 		pac->acl_next = np->ipv6_ac_list;
 		np->ipv6_ac_list = pac;
-		spin_unlock_bh(&ipv6_sk_ac_lock);
 		pac = NULL;
 	}
 
@@ -152,7 +146,7 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 	struct ipv6_ac_socklist *pac, *prev_pac;
 	struct net *net = sock_net(sk);
 
-	spin_lock_bh(&ipv6_sk_ac_lock);
+	rtnl_lock();
 	prev_pac = NULL;
 	for (pac = np->ipv6_ac_list; pac; pac = pac->acl_next) {
 		if ((ifindex == 0 || pac->acl_ifindex == ifindex) &&
@@ -161,7 +155,7 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 		prev_pac = pac;
 	}
 	if (!pac) {
-		spin_unlock_bh(&ipv6_sk_ac_lock);
+		rtnl_unlock();
 		return -ENOENT;
 	}
 	if (prev_pac)
@@ -169,9 +163,6 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 	else
 		np->ipv6_ac_list = pac->acl_next;
 
-	spin_unlock_bh(&ipv6_sk_ac_lock);
-
-	rtnl_lock();
 	dev = __dev_get_by_index(net, pac->acl_ifindex);
 	if (dev)
 		ipv6_dev_ac_dec(dev, &pac->acl_addr);
@@ -192,13 +183,11 @@ void ipv6_sock_ac_close(struct sock *sk)
 	if (!np->ipv6_ac_list)
 		return;
 
-	spin_lock_bh(&ipv6_sk_ac_lock);
+	rtnl_lock();
 	pac = np->ipv6_ac_list;
 	np->ipv6_ac_list = NULL;
-	spin_unlock_bh(&ipv6_sk_ac_lock);
 
 	prev_index = 0;
-	rtnl_lock();
 	while (pac) {
 		struct ipv6_ac_socklist *next = pac->acl_next;
 
-- 
1.8.3.1

^ permalink raw reply related

* [Patch net-next 3/5] ipv6: clean up ipv6_dev_ac_inc()
From: Cong Wang @ 2014-09-09 23:52 UTC (permalink / raw)
  To: netdev; +Cc: Hannes Frederic Sowa, Hideaki YOSHIFUJI, David S. Miller,
	Cong Wang
In-Reply-To: <1410306738-18036-1-git-send-email-xiyou.wangcong@gmail.com>

Make it accept inet6_dev, and rename it to __ipv6_dev_ac_inc()
to reflect this change.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 include/net/addrconf.h |  2 +-
 net/ipv6/addrconf.c    |  2 +-
 net/ipv6/anycast.c     | 17 +++++------------
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index f679877..9b1d42e 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -202,7 +202,7 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex,
 		      const struct in6_addr *addr);
 void ipv6_sock_ac_close(struct sock *sk);
 
-int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr);
+int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr);
 int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr);
 bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev,
 			 const struct in6_addr *addr);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index ad4598f..6b6a373 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1725,7 +1725,7 @@ static void addrconf_join_anycast(struct inet6_ifaddr *ifp)
 	ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
 	if (ipv6_addr_any(&addr))
 		return;
-	ipv6_dev_ac_inc(ifp->idev->dev, &addr);
+	__ipv6_dev_ac_inc(ifp->idev, &addr);
 }
 
 /* caller must hold RTNL */
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index d10f2e2..bec8d14 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -122,7 +122,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 			goto error;
 	}
 
-	err = ipv6_dev_ac_inc(dev, addr);
+	err = __ipv6_dev_ac_inc(idev, addr);
 	if (!err) {
 		pac->acl_next = np->ipv6_ac_list;
 		np->ipv6_ac_list = pac;
@@ -215,20 +215,15 @@ static void aca_put(struct ifacaddr6 *ac)
 /*
  *	device anycast group inc (add if not found)
  */
-int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr)
+int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr)
 {
 	struct ifacaddr6 *aca;
-	struct inet6_dev *idev;
 	struct rt6_info *rt;
 	int err;
 
 	ASSERT_RTNL();
 
-	idev = in6_dev_get(dev);
-
-	if (idev == NULL)
-		return -EINVAL;
-
+	in6_dev_hold(idev);
 	write_lock_bh(&idev->lock);
 	if (idev->dead) {
 		err = -ENODEV;
@@ -267,7 +262,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr)
 	aca->aca_users = 1;
 	/* aca_tstamp should be updated upon changes */
 	aca->aca_cstamp = aca->aca_tstamp = jiffies;
-	atomic_set(&aca->aca_refcnt, 2);
+	atomic_set(&aca->aca_refcnt, 1);
 	spin_lock_init(&aca->aca_lock);
 
 	aca->aca_next = idev->ac_list;
@@ -276,9 +271,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr)
 
 	ip6_ins_rt(rt);
 
-	addrconf_join_solict(dev, &aca->aca_addr);
-
-	aca_put(aca);
+	addrconf_join_solict(idev->dev, &aca->aca_addr);
 	return 0;
 out:
 	write_unlock_bh(&idev->lock);
-- 
1.8.3.1

^ permalink raw reply related

* [Patch net-next 4/5] ipv6: drop ipv6_sk_mc_lock in mcast
From: Cong Wang @ 2014-09-09 23:52 UTC (permalink / raw)
  To: netdev; +Cc: Hannes Frederic Sowa, Hideaki YOSHIFUJI, David S. Miller,
	Cong Wang
In-Reply-To: <1410306738-18036-1-git-send-email-xiyou.wangcong@gmail.com>

Similarly the code is already protected by rtnl lock.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/ipv6/mcast.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 6833dd0..d2b7dd8 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -82,9 +82,6 @@ static void *__mld2_query_bugs[] __attribute__((__unused__)) = {
 
 static struct in6_addr mld2_all_mcr = MLD2_ALL_MCR_INIT;
 
-/* Big mc list lock for all the sockets */
-static DEFINE_SPINLOCK(ipv6_sk_mc_lock);
-
 static void igmp6_join_group(struct ifmcaddr6 *ma);
 static void igmp6_leave_group(struct ifmcaddr6 *ma);
 static void igmp6_timer_handler(unsigned long data);
@@ -210,10 +207,8 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 		return err;
 	}
 
-	spin_lock(&ipv6_sk_mc_lock);
 	mc_lst->next = np->ipv6_mc_list;
 	rcu_assign_pointer(np->ipv6_mc_list, mc_lst);
-	spin_unlock(&ipv6_sk_mc_lock);
 
 	rcu_read_unlock();
 	rtnl_unlock();
@@ -235,17 +230,14 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 		return -EINVAL;
 
 	rtnl_lock();
-	spin_lock(&ipv6_sk_mc_lock);
 	for (lnk = &np->ipv6_mc_list;
-	     (mc_lst = rcu_dereference_protected(*lnk,
-			lockdep_is_held(&ipv6_sk_mc_lock))) != NULL;
+	     (mc_lst = rtnl_dereference(*lnk)) != NULL;
 	      lnk = &mc_lst->next) {
 		if ((ifindex == 0 || mc_lst->ifindex == ifindex) &&
 		    ipv6_addr_equal(&mc_lst->addr, addr)) {
 			struct net_device *dev;
 
 			*lnk = mc_lst->next;
-			spin_unlock(&ipv6_sk_mc_lock);
 
 			rcu_read_lock();
 			dev = dev_get_by_index_rcu(net, mc_lst->ifindex);
@@ -265,7 +257,6 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 			return 0;
 		}
 	}
-	spin_unlock(&ipv6_sk_mc_lock);
 	rtnl_unlock();
 
 	return -EADDRNOTAVAIL;
@@ -312,13 +303,10 @@ void ipv6_sock_mc_close(struct sock *sk)
 		return;
 
 	rtnl_lock();
-	spin_lock(&ipv6_sk_mc_lock);
-	while ((mc_lst = rcu_dereference_protected(np->ipv6_mc_list,
-				lockdep_is_held(&ipv6_sk_mc_lock))) != NULL) {
+	while ((mc_lst = rtnl_dereference(np->ipv6_mc_list)) != NULL) {
 		struct net_device *dev;
 
 		np->ipv6_mc_list = mc_lst->next;
-		spin_unlock(&ipv6_sk_mc_lock);
 
 		rcu_read_lock();
 		dev = dev_get_by_index_rcu(net, mc_lst->ifindex);
@@ -335,9 +323,7 @@ void ipv6_sock_mc_close(struct sock *sk)
 		atomic_sub(sizeof(*mc_lst), &sk->sk_omem_alloc);
 		kfree_rcu(mc_lst, rcu);
 
-		spin_lock(&ipv6_sk_mc_lock);
 	}
-	spin_unlock(&ipv6_sk_mc_lock);
 	rtnl_unlock();
 }
 
-- 
1.8.3.1

^ permalink raw reply related

* [Patch net-next 5/5] ipv6: drop some rcu_read_lock in mcast
From: Cong Wang @ 2014-09-09 23:52 UTC (permalink / raw)
  To: netdev; +Cc: Hannes Frederic Sowa, Hideaki YOSHIFUJI, David S. Miller,
	Cong Wang
In-Reply-To: <1410306738-18036-1-git-send-email-xiyou.wangcong@gmail.com>

Similarly the code is already protected by rtnl lock.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/ipv6/mcast.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index d2b7dd8..255409c 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -171,7 +171,6 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 	mc_lst->addr = *addr;
 
 	rtnl_lock();
-	rcu_read_lock();
 	if (ifindex == 0) {
 		struct rt6_info *rt;
 		rt = rt6_lookup(net, addr, NULL, 0, 0);
@@ -180,10 +179,9 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 			ip6_rt_put(rt);
 		}
 	} else
-		dev = dev_get_by_index_rcu(net, ifindex);
+		dev = __dev_get_by_index(net, ifindex);
 
 	if (dev == NULL) {
-		rcu_read_unlock();
 		rtnl_unlock();
 		sock_kfree_s(sk, mc_lst, sizeof(*mc_lst));
 		return -ENODEV;
@@ -201,7 +199,6 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 	err = ipv6_dev_mc_inc(dev, addr);
 
 	if (err) {
-		rcu_read_unlock();
 		rtnl_unlock();
 		sock_kfree_s(sk, mc_lst, sizeof(*mc_lst));
 		return err;
@@ -210,7 +207,6 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
 	mc_lst->next = np->ipv6_mc_list;
 	rcu_assign_pointer(np->ipv6_mc_list, mc_lst);
 
-	rcu_read_unlock();
 	rtnl_unlock();
 
 	return 0;
@@ -239,8 +235,7 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 
 			*lnk = mc_lst->next;
 
-			rcu_read_lock();
-			dev = dev_get_by_index_rcu(net, mc_lst->ifindex);
+			dev = __dev_get_by_index(net, mc_lst->ifindex);
 			if (dev != NULL) {
 				struct inet6_dev *idev = __in6_dev_get(dev);
 
@@ -249,7 +244,6 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 					__ipv6_dev_mc_dec(idev, &mc_lst->addr);
 			} else
 				(void) ip6_mc_leave_src(sk, mc_lst, NULL);
-			rcu_read_unlock();
 			rtnl_unlock();
 
 			atomic_sub(sizeof(*mc_lst), &sk->sk_omem_alloc);
@@ -308,8 +302,7 @@ void ipv6_sock_mc_close(struct sock *sk)
 
 		np->ipv6_mc_list = mc_lst->next;
 
-		rcu_read_lock();
-		dev = dev_get_by_index_rcu(net, mc_lst->ifindex);
+		dev = __dev_get_by_index(net, mc_lst->ifindex);
 		if (dev) {
 			struct inet6_dev *idev = __in6_dev_get(dev);
 
@@ -318,7 +311,6 @@ void ipv6_sock_mc_close(struct sock *sk)
 				__ipv6_dev_mc_dec(idev, &mc_lst->addr);
 		} else
 			(void) ip6_mc_leave_src(sk, mc_lst, NULL);
-		rcu_read_unlock();
 
 		atomic_sub(sizeof(*mc_lst), &sk->sk_omem_alloc);
 		kfree_rcu(mc_lst, rcu);
@@ -943,7 +935,7 @@ int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr)
 	struct inet6_dev *idev;
 	int err;
 
-	rcu_read_lock();
+	ASSERT_RTNL();
 
 	idev = __in6_dev_get(dev);
 	if (!idev)
@@ -951,7 +943,6 @@ int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr)
 	else
 		err = __ipv6_dev_mc_dec(idev, addr);
 
-	rcu_read_unlock();
 	return err;
 }
 
-- 
1.8.3.1

^ permalink raw reply related

* Re: Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
From: Andres Freund @ 2014-09-09 23:55 UTC (permalink / raw)
  To: Cong Wang
  Cc: Alexander Y. Fomichev, David Miller, Linus Torvalds,
	Andrew Morton, netdev, linux-kernel@vger.kernel.org
In-Reply-To: <20140909234806.GG24649@awork2.anarazel.de>

On 2014-09-10 01:48:06 +0200, Andres Freund wrote:
> On 2014-09-09 15:43:55 -0700, Cong Wang wrote:
> > On Mon, Sep 8, 2014 at 2:25 PM, Andres Freund <andres@anarazel.de> wrote:
> > > Hi,
> > >
> > > (don't have netdev archived, thus answering here, sorry)
> > >
> > > On 2014-09-07 16:41:09 -0700, David Miller wrote:
> > >> Alexander Y. Fomichev (1):
> > >>       net: prevent of emerging cross-namespace symlinks
> > >
> > 
> > Since you are quoting this change, are you saying it causes
> > the following kernel warning?
> 
> I thought it might be a likely candidate; but I'm not sure at all. I'll
> verify it as soon as I can reboot the machine a couple of times (end of
> week-ish).
> 
> > > I'm seeing WARNINGs like:
> > > [ 1005.269134] ------------[ cut here ]------------
> > > [ 1005.269148] WARNING: CPU: 6 PID: 4213 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x80()
> > > [ 1005.269150] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0'
> > 
> > 
> > Is there a network device named upper_mv-eth0 existed in your system
> > before you created macvlan?
> 
> No, there wasn't any. Afaics, the sequence is:
> 1) macvlan mv-eth0 is created in global namespace
> 2) mv-eth0 is moved (by systemd-nsspawn) into a new network
>    namespace. Leaving a dangling symlink in the host namespace
> /devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0 pointing toward
> ../mv-eth0
> which doesn't exist in the external namespace. The new namespace seems
> to have broken 'lower_bond0' symlink as well
> 
> This seems to be the case (and probably the actual root cause) in
> slightly earlier kernels as well.
> What changed seems to be that:
> 3) macvlan mv-eth0 is destroyed in the namespace (potentially while
>    tearing it down)
> 4) Now there's a broken symlink that doesn't make sense in any namespace
> 5) mv-eth0 can't be created anew
> 
> It seems that 3-5 didn't happen that way on older kernels. The most
> recent where it's not persistently broken is 3.16.0-rc7-00007 -
> 31dab719f. The oldest where I know it's reproducible is
> 3.17.0-rc4-andres-00135-g35af256.

I've reproduced the problem on another machine where it's perfectly
reproducible (except being about mv-bond0). After reverting only the
aforementioned 4c75431ac352063 it works again.
As I said above, I'm not sure whether 4c75431ac352063 is the actual
culprit, but it certainly made the problem visible. How are these
upper_$if/lower_$if supposed to behave when the macvlan and the
underlying device are in differing namespaces?

Greetings,

Andres Freund

^ permalink raw reply

* Re: [PATCH v2 net-next] tcp: remove dst refcount false sharing for prequeue mode
From: David Miller @ 2014-09-09 23:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: therbert, alexander.h.duyck, netdev
In-Reply-To: <1410211842.11872.133.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 08 Sep 2014 14:30:42 -0700

> In the worst case, here is what is happening :
> 
> sk_rx_dst is checked and invalidated in tcp_v4_do_rcv()
> 
> Next packets coming from prequeue might then have a NULL dst, and
> we'll do nothing special (sk_rx_dst will stay NULL), because we do
> handle NULL dst properly in inet_sk_rx_dst_set() and
> inet6_sk_rx_dst_set() 
> 
> But next packet to be processed (either in non prequeue mode or
> prequeue) will carry skb->dst and we will set sk->sk_rx_dst
> 
> I decided to not copy/paste the tests we do in the family dependent
> parts, because it was not worth the pain.

And, now applied.

^ permalink raw reply

* Re: [PATCH net-next v2 0/3] BPF updates
From: David Miller @ 2014-09-10  0:00 UTC (permalink / raw)
  To: dborkman; +Cc: ast, mgherzan, netdev
In-Reply-To: <1410156289-3190-1-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Mon,  8 Sep 2014 08:04:46 +0200

> [ Set applies on top of current net-next but also on top of
>   Alexei's latest patches. Please see individual patches for
>   more details. ]
> 
> Changelog:
>  v1->v2:
>   - Removed paragraph in 1st commit message
>   - Rest stays the same

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next] skb: Add documentation for skb_clone_sk
From: David Miller @ 2014-09-10  0:20 UTC (permalink / raw)
  To: alexander.h.duyck; +Cc: netdev, richardcochran
In-Reply-To: <20140908161748.13099.29093.stgit@ahduyck-bv4.jf.intel.com>

From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Mon, 08 Sep 2014 12:18:22 -0400

> This change adds some documentation to the call skb_clone_sk.  This is
> meant to help clarify the purpose of the function for other developers.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>

Since there is still active discussion about whether the socket
refcounting is even handled correctly by these mechanisms, I
am deferring on this patch for now.

^ permalink raw reply

* Re: [PATCH ipvs v2] ipvs: Add simple weighted failover scheduler
From: Simon Horman @ 2014-09-10  0:21 UTC (permalink / raw)
  To: Julian Anastasov; +Cc: Kenny Mathis, netdev, Wensong Zhang
In-Reply-To: <alpine.LFD.2.11.1409092247220.4943@ja.home.ssi.bg>

On Tue, Sep 09, 2014 at 10:55:42PM +0300, Julian Anastasov wrote:
> 
> 	Hello,
> 
> On Tue, 9 Sep 2014, Kenny Mathis wrote:
> 
> > Please consider this patch for addition in 3.17

There is no need to update this patch, but for reference
the line above belongs below scissors ('---') below your Signed-off-by line.
i.e. just above the diffstat below.

That way git will automatically remove it when you apply your patch.

> > Add simple weighted IPVS failover support to the Linux kernel. All
> > other scheduling modules implement some form of load balancing, while
> > this offers a simple failover solution. Connections are directed to
> > the appropriate server based solely on highest weight value and server
> > availability. Tested functionality with keepalived.
> > 
> > Signed-off-by: Kenny Mathis <kmathis@chokepoint.net>
> 
> 	Looks good to me, thanks!
> 
> Acked-by: Julian Anastasov <ja@ssi.bg>
> 
> 	Simon, you can apply it to ipvs-next if there are
> no any objections.

I have no objections. I have applied it.

> > ---
> >  net/netfilter/ipvs/Kconfig    |   10 ++++++
> >  net/netfilter/ipvs/Makefile   |    1 +
> >  net/netfilter/ipvs/ip_vs_fo.c |   79 +++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 90 insertions(+)
> >  create mode 100644 net/netfilter/ipvs/ip_vs_fo.c
> > 
> > diff --git a/net/netfilter/ipvs/Kconfig b/net/netfilter/ipvs/Kconfig
> > index 0c3b167..3b6929d 100644
> > --- a/net/netfilter/ipvs/Kconfig
> > +++ b/net/netfilter/ipvs/Kconfig
> > @@ -152,6 +152,16 @@ config	IP_VS_WLC
> >  	  If you want to compile it in kernel, say Y. To compile it as a
> >  	  module, choose M here. If unsure, say N.
> >  
> > +config  IP_VS_FO
> > +		tristate "weighted failover scheduling"
> > +	---help---
> > +	  The weighted failover scheduling algorithm directs network
> > +	  connections to the server with the highest weight that is
> > +	  currently available.
> > +
> > +	  If you want to compile it in kernel, say Y. To compile it as a
> > +	  module, choose M here. If unsure, say N.
> > +
> >  config	IP_VS_LBLC
> >  	tristate "locality-based least-connection scheduling"
> >  	---help---
> > diff --git a/net/netfilter/ipvs/Makefile b/net/netfilter/ipvs/Makefile
> > index 34ee602..38b2723 100644
> > --- a/net/netfilter/ipvs/Makefile
> > +++ b/net/netfilter/ipvs/Makefile
> > @@ -26,6 +26,7 @@ obj-$(CONFIG_IP_VS_RR) += ip_vs_rr.o
> >  obj-$(CONFIG_IP_VS_WRR) += ip_vs_wrr.o
> >  obj-$(CONFIG_IP_VS_LC) += ip_vs_lc.o
> >  obj-$(CONFIG_IP_VS_WLC) += ip_vs_wlc.o
> > +obj-$(CONFIG_IP_VS_FO) += ip_vs_fo.o
> >  obj-$(CONFIG_IP_VS_LBLC) += ip_vs_lblc.o
> >  obj-$(CONFIG_IP_VS_LBLCR) += ip_vs_lblcr.o
> >  obj-$(CONFIG_IP_VS_DH) += ip_vs_dh.o
> > diff --git a/net/netfilter/ipvs/ip_vs_fo.c b/net/netfilter/ipvs/ip_vs_fo.c
> > new file mode 100644
> > index 0000000..6a2647d
> > --- /dev/null
> > +++ b/net/netfilter/ipvs/ip_vs_fo.c
> > @@ -0,0 +1,79 @@
> > +/*
> > + * IPVS:        Weighted Fail Over module
> > + *
> > + * Authors:     Kenny Mathis <kmathis@chokepoint.net>
> > + *
> > + *              This program is free software; you can redistribute it and/or
> > + *              modify it under the terms of the GNU General Public License
> > + *              as published by the Free Software Foundation; either version
> > + *              2 of the License, or (at your option) any later version.
> > + *
> > + * Changes:
> > + *     Kenny Mathis            :     added initial functionality based on weight
> > + *
> > + */
> > +
> > +#define KMSG_COMPONENT "IPVS"
> > +#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
> > +
> > +#include <linux/module.h>
> > +#include <linux/kernel.h>
> > +
> > +#include <net/ip_vs.h>
> > +
> > +/* Weighted Fail Over Module */
> > +static struct ip_vs_dest *
> > +ip_vs_fo_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
> > +		  struct ip_vs_iphdr *iph)
> > +{
> > +	struct ip_vs_dest *dest, *hweight = NULL;
> > +	int hw = 0; /* Track highest weight */
> > +
> > +	IP_VS_DBG(6, "ip_vs_fo_schedule(): Scheduling...\n");
> > +
> > +	/* Basic failover functionality
> > +	 * Find virtual server with highest weight and send it traffic
> > +	 */
> > +	list_for_each_entry_rcu(dest, &svc->destinations, n_list) {
> > +		if (!(dest->flags & IP_VS_DEST_F_OVERLOAD) &&
> > +		    atomic_read(&dest->weight) > hw) {
> > +			hweight = dest;
> > +			hw = atomic_read(&dest->weight);
> > +		}
> > +	}
> > +
> > +	if (hweight) {
> > +		IP_VS_DBG_BUF(6, "FO: server %s:%u activeconns %d weight %d\n",
> > +			      IP_VS_DBG_ADDR(svc->af, &hweight->addr),
> > +			      ntohs(hweight->port),
> > +			      atomic_read(&hweight->activeconns),
> > +			      atomic_read(&hweight->weight));
> > +		return hweight;
> > +	}
> > +
> > +	ip_vs_scheduler_err(svc, "no destination available");
> > +	return NULL;
> > +}
> > +
> > +static struct ip_vs_scheduler ip_vs_fo_scheduler = {
> > +	.name =			"fo",
> > +	.refcnt =		ATOMIC_INIT(0),
> > +	.module =		THIS_MODULE,
> > +	.n_list =		LIST_HEAD_INIT(ip_vs_fo_scheduler.n_list),
> > +	.schedule =		ip_vs_fo_schedule,
> > +};
> > +
> > +static int __init ip_vs_fo_init(void)
> > +{
> > +	return register_ip_vs_scheduler(&ip_vs_fo_scheduler);
> > +}
> > +
> > +static void __exit ip_vs_fo_cleanup(void)
> > +{
> > +	unregister_ip_vs_scheduler(&ip_vs_fo_scheduler);
> > +	synchronize_rcu();
> > +}
> > +
> > +module_init(ip_vs_fo_init);
> > +module_exit(ip_vs_fo_cleanup);
> > +MODULE_LICENSE("GPL");
> > -- 
> > 1.7.9.5
> 
> Regards
> 
> --
> Julian Anastasov <ja@ssi.bg>
> 

^ permalink raw reply

* Re: [PATCH V2 net] core: Don't attempt to load the "" driver.
From: David Miller @ 2014-09-10  0:24 UTC (permalink / raw)
  To: David.Laight; +Cc: netdev
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1748BC57@AcuExch.aculab.com>

From: David Laight <David.Laight@ACULAB.COM>
Date: Mon, 8 Sep 2014 13:23:33 +0000

> This whole 'try to load the module' path should be predicated on
> 'interface not found'.

And that's the first thing dev_load() does, it tries to look up the
device by name, and only does the module load attempt if that fails.

Nobody cares if the module load itself actually fails, dev_load()
returns void after all.

^ permalink raw reply

* Re: [PATCH net-next] sfc: Convert the normal transmit complete path to dev_consume_skb_any()
From: Eric Dumazet @ 2014-09-10  0:25 UTC (permalink / raw)
  To: Rick Jones; +Cc: Rick Jones, netdev, davem, sshah, linux-net-drivers
In-Reply-To: <540F8F78.9020502@hp.com>

On Tue, 2014-09-09 at 16:38 -0700, Rick Jones wrote:

> I can remove that const, and then smooth the ripples stemming from it to 
> arrive at something like:

Oh I missed this const, so this will be a different patch, sorry for
this.

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply

* Re: [PATCH v6 1/4] ethernet: arc: Add support for Rockchip SoC layer device tree bindings
From: David Miller @ 2014-09-10  0:30 UTC (permalink / raw)
  To: romain.perier
  Cc: heiko, linux-rockchip, linux-arm-kernel, netdev, devicetree, arnd
In-Reply-To: <1410196490-5646-1-git-send-email-romain.perier@gmail.com>

From: Romain Perier <romain.perier@gmail.com>
Date: Mon,  8 Sep 2014 17:14:47 +0000

> This patch defines a platform glue layer for Rockchip SoCs which
> support arc-emac driver. It ensures that regulator for the rmii is on
> before trying to connect to the ethernet controller. It applies right
> speed and mode changes to the grf when ethernet settings change.
> 
> Signed-off-by: Romain Perier <romain.perier@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH v2 3/4] ARM: dts: Add emac nodes to the rk3188 device tree
From: David Miller @ 2014-09-10  0:30 UTC (permalink / raw)
  To: romain.perier
  Cc: heiko, linux-rockchip, linux-arm-kernel, netdev, devicetree, arnd
In-Reply-To: <1410196490-5646-3-git-send-email-romain.perier@gmail.com>

From: Romain Perier <romain.perier@gmail.com>
Date: Mon,  8 Sep 2014 17:14:49 +0000

> This adds support for EMAC Rockchip driver on RK3188 SoCs.
> 
> Signed-off-by: Romain Perier <romain.perier@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH v2 2/4] dt-bindings: Document EMAC Rockchip
From: David Miller @ 2014-09-10  0:30 UTC (permalink / raw)
  To: romain.perier-Re5JQEeQqe8AvxtiuMwx3w
  Cc: heiko-4mtYJXux2i+zQB+pC5nmwQ,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
	arnd-r2nGTMty4D4
In-Reply-To: <1410196490-5646-2-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

From: Romain Perier <romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Mon,  8 Sep 2014 17:14:48 +0000

> This adds the necessary binding documentation for the EMAC Rockchip platform
> driver found in RK3066 and RK3188 SoCs.
> 
> Signed-off-by: Romain Perier <romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH v2 4/4] ARM: dts: Enable emac node on the rk3188-radxarock boards
From: David Miller @ 2014-09-10  0:30 UTC (permalink / raw)
  To: romain.perier
  Cc: heiko, linux-rockchip, linux-arm-kernel, netdev, devicetree, arnd
In-Reply-To: <1410196490-5646-4-git-send-email-romain.perier@gmail.com>

From: Romain Perier <romain.perier@gmail.com>
Date: Mon,  8 Sep 2014 17:14:50 +0000

> This enables EMAC Rockchip support on radxa rock boards.
> 
> Signed-off-by: Romain Perier <romain.perier@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next v2 0/7] bonding: get rid of bond->lock
From: David Miller @ 2014-09-10  0:32 UTC (permalink / raw)
  To: nikolay; +Cc: netdev, hariprasad, vfalico, j.vosburgh, andy
In-Reply-To: <1410297423-26624-1-git-send-email-nikolay@redhat.com>

From: Nikolay Aleksandrov <nikolay@redhat.com>
Date: Tue,  9 Sep 2014 23:16:56 +0200

> This patch-set removes the last users of bond->lock and converts the places
> that needed it for sync to use curr_slave_lock or RCU as appropriate.
> I've run this with lockdep and have stress-tested it via loading/unloading
> and enslaving/releasing in parallel while outputting bond's proc, I didn't
> see any issues. Please pay special attention to the procfs change, I've
> done about an hour of stress-testing on it and have checked that the event
> that causes the bonding to delete its proc entry (NETDEV_UNREGISTER) is
> called before ndo_uninit() and the freeing of the dev so any readers will
> sync with that. Also ran sparse checks and there were no splats.
> 
> v2: Add patch 0001/cxgb4 bond->lock removal, RTNL should be held in the
>     notifier call, the other patches are the same. Also tested with
>     allmodconfig to make sure there're no more users of bond->lock.
> Changes from the RFC:
>  use RCU in procfs instead of RTNL since RTNL might lead to a deadlock with
>  unloading and also is much slower. The bond destruction syncs with proc
>  via the proc locks. There's one new patch that converts primary_slave to
>  use RCU as it was necessary to fix a longstanding bugs in sysfs and
>  procfs and to make it easy to migrate bond's procfs to RCU. And of course
>  rebased on top of net-next current.
> 
> This is the first patch-set in a series that should simplify the bond's
> locking requirements and will make it easier to define the locking
> conditions necessary for the various paths. The goal is to rely on RTNL
> and rcu alone, an extra lock would be needed in a few special cases that
> would be documented very well.

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next] sfc: Convert the normal transmit complete path to dev_consume_skb_any()
From: David Miller @ 2014-09-10  0:34 UTC (permalink / raw)
  To: eric.dumazet; +Cc: rick.jones2, raj, netdev, sshah, linux-net-drivers
In-Reply-To: <1410308730.7106.23.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 09 Sep 2014 17:25:30 -0700

> On Tue, 2014-09-09 at 16:38 -0700, Rick Jones wrote:
> 
>> I can remove that const, and then smooth the ripples stemming from it to 
>> arrive at something like:
> 
> Oh I missed this const, so this will be a different patch, sorry for
> this.
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied, thanks everyone.

 

^ permalink raw reply

* Re: [PATCH next] net_sched: sfq: remove unused macro
From: David Miller @ 2014-09-10  0:35 UTC (permalink / raw)
  To: fw; +Cc: netdev
In-Reply-To: <1410211981-31081-1-git-send-email-fw@strlen.de>

From: Florian Westphal <fw@strlen.de>
Date: Mon,  8 Sep 2014 23:33:01 +0200

> not used anymore since ddecf0f
> (net_sched: sfq: add optional RED on top of SFQ).
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>

Applied.

^ permalink raw reply

* Re: [PATCH net-next v2] net-timestamp: optimize sock_tx_timestamp default path
From: David Miller @ 2014-09-10  0:35 UTC (permalink / raw)
  To: willemb; +Cc: netdev, eric.dumazet, richardcochran
In-Reply-To: <1410220738-6395-1-git-send-email-willemb@google.com>

From: Willem de Bruijn <willemb@google.com>
Date: Mon,  8 Sep 2014 19:58:58 -0400

> Few packets have timestamping enabled. Exit sock_tx_timestamp quickly
> in this common case.
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/1] net:socket: set msg_namelen to 0 if msg_name is passed as NULL in msghdr struct from userland.
From: David Miller @ 2014-09-10  0:36 UTC (permalink / raw)
  To: ani; +Cc: fruggeri, netdev, fenner, travisb, hannes, matthew.leach,
	eric.dumazet
In-Reply-To: <1410212999-11013-1-git-send-email-ani@arista.com>

From: Ani Sinha <ani@arista.com>
Date: Mon,  8 Sep 2014 14:49:59 -0700

> Linux manpage for recvmsg and sendmsg calls does not explicitly mention setting msg_namelen to 0 when
> msg_name passed set as NULL. When developers don't set msg_namelen member in msghdr, it might contain garbage
> value which will fail the validation check and sendmsg and recvmsg calls from kernel will return EINVAL. This will
> break old binaries and any code for which there is no access to source code.
> To fix this, we set msg_namelen to 0 when msg_name is passed as NULL from userland.
> 
> Signed-off-by: Ani Sinha <ani@arista.com>

Applied, thanks.

^ permalink raw reply


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