Netdev List
 help / color / mirror / Atom feed
* [PATCH 02/17] wpan-phy: add wpan-phy iteration functions
From: Dmitry Eremin-Solenikov @ 2009-11-06 12:39 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Sergey Lapin
In-Reply-To: <1257511181-19403-1-git-send-email-dbaryshkov@gmail.com>

Add API to iterate over the wpan-phy instances.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 include/net/wpan-phy.h      |    2 ++
 net/ieee802154/wpan-class.c |   25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h
index 5e803a0..3367dd9 100644
--- a/include/net/wpan-phy.h
+++ b/include/net/wpan-phy.h
@@ -48,6 +48,8 @@ struct wpan_phy *wpan_phy_alloc(size_t priv_size);
 int wpan_phy_register(struct device *parent, struct wpan_phy *phy);
 void wpan_phy_unregister(struct wpan_phy *phy);
 void wpan_phy_free(struct wpan_phy *phy);
+/* Same semantics as for class_for_each_device */
+int wpan_phy_for_each(int (*fn)(struct wpan_phy *phy, void *data), void *data);
 
 static inline void *wpan_phy_priv(struct wpan_phy *phy)
 {
diff --git a/net/ieee802154/wpan-class.c b/net/ieee802154/wpan-class.c
index f306604..0cec138 100644
--- a/net/ieee802154/wpan-class.c
+++ b/net/ieee802154/wpan-class.c
@@ -91,6 +91,31 @@ struct wpan_phy *wpan_phy_find(const char *str)
 }
 EXPORT_SYMBOL(wpan_phy_find);
 
+struct wpan_phy_iter_data {
+	int (*fn)(struct wpan_phy *phy, void *data);
+	void *data;
+};
+
+static int wpan_phy_iter(struct device *dev, void *_data)
+{
+	struct wpan_phy_iter_data *wpid = _data;
+	struct wpan_phy *phy = container_of(dev, struct wpan_phy, dev);
+	return wpid->fn(phy, wpid->data);
+}
+
+int wpan_phy_for_each(int (*fn)(struct wpan_phy *phy, void *data),
+		void *data)
+{
+	struct wpan_phy_iter_data wpid = {
+		.fn = fn,
+		.data = data,
+	};
+
+	return class_for_each_device(&wpan_phy_class, NULL,
+			&wpid, wpan_phy_iter);
+}
+EXPORT_SYMBOL(wpan_phy_for_each);
+
 static int wpan_phy_idx_valid(int idx)
 {
 	return idx >= 0;
-- 
1.6.5


^ permalink raw reply related

* [PATCH 01/17] wpan-phy: add a helper to put the wpan_phy device
From: Dmitry Eremin-Solenikov @ 2009-11-06 12:39 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Sergey Lapin
In-Reply-To: <1257511181-19403-1-git-send-email-dbaryshkov@gmail.com>

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 include/net/wpan-phy.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h
index 547b1e2..5e803a0 100644
--- a/include/net/wpan-phy.h
+++ b/include/net/wpan-phy.h
@@ -56,6 +56,12 @@ static inline void *wpan_phy_priv(struct wpan_phy *phy)
 }
 
 struct wpan_phy *wpan_phy_find(const char *str);
+
+static inline void wpan_phy_put(struct wpan_phy *phy)
+{
+	put_device(&phy->dev);
+}
+
 static inline const char *wpan_phy_name(struct wpan_phy *phy)
 {
 	return dev_name(&phy->dev);
-- 
1.6.5


^ permalink raw reply related

* [NEXT PULL 00/17] IEEE 802.15.4 stack updates.
From: Dmitry Eremin-Solenikov @ 2009-11-06 12:39 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Sergey Lapin

Please pull into net-next an update for IEEE 802.15.4

The following changes since commit 6a2a2d6bf8581216e08be15fcb563cfd6c430e1e:
  Gilad Ben-Yossef (1):
        tcp: Use defaults when no route options are available

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git for-next

Dmitry Eremin-Solenikov (17):
      wpan-phy: add a helper to put the wpan_phy device
      wpan-phy: add wpan-phy iteration functions
      wpan-phy: init channel/page fields
      wpan-phy: use snprintf to limit the amount of chars written
      wpan-phy: allow specifying a per-page channel mask
      wpan-phy: follow usual patter of devices registration
      ieee802154: constify struct net_device in some operations
      ieee802154: merge nl802154 and wpan-class in single module
      ieee802154: split away MAC commands implementation
      ieee802154: add LIST_PHY command support
      fakehard: no need to export net_to_phy, make it static
      fakehard: claim all 2.4 Ghz channels as supported
      ieee802154: add an mlme_ops call to retrieve PHY object
      fakehard: mlme_ops->get_phy implementation
      ieee802154: add two nl802154 helpers
      ieee802154: add PHY_NAME to LIST_IFACE command results
      ieee802154: add support for creation/removal of logic interfaces

 drivers/ieee802154/fakehard.c   |   59 +++-
 include/linux/nl802154.h        |    6 +
 include/net/ieee802154_netdev.h |   16 +-
 include/net/wpan-phy.h          |   22 ++-
 net/ieee802154/Makefile         |    4 +-
 net/ieee802154/ieee802154.h     |   53 ++++
 net/ieee802154/netlink.c        |  613 ++------------------------------------
 net/ieee802154/nl-mac.c         |  617 +++++++++++++++++++++++++++++++++++++++
 net/ieee802154/nl-phy.c         |  344 ++++++++++++++++++++++
 net/ieee802154/nl_policy.c      |    2 +
 net/ieee802154/wpan-class.c     |   77 +++++-
 11 files changed, 1202 insertions(+), 611 deletions(-)
 create mode 100644 net/ieee802154/ieee802154.h
 create mode 100644 net/ieee802154/nl-mac.c
 create mode 100644 net/ieee802154/nl-phy.c


^ permalink raw reply

* [PATCH 2/2] be2net: Bug fix to send config commands to hardware after netdev_register
From: Ajit Khaparde @ 2009-11-06 12:07 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Sending config commands to be2 hardware before netdev_register is
completed, is sometimes causing the async link notification to arrive
even before the driver is ready to handle it. The commands for vlan
config and flow control settings can infact wait till be_open.
This patch takes care of that.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be_main.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 4a7a452..876b357 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1610,11 +1610,21 @@ static int be_open(struct net_device *netdev)
 
 	status = be_cmd_link_status_query(adapter, &link_up);
 	if (status)
-		return status;
+		goto ret_sts;
 	be_link_status_update(adapter, link_up);
 
+	status = be_vid_config(adapter);
+	if (status)
+		goto ret_sts;
+
+	status = be_cmd_set_flow_control(adapter,
+					adapter->tx_fc, adapter->rx_fc);
+	if (status)
+		goto ret_sts;
+
 	schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
-	return 0;
+ret_sts:
+	return status;
 }
 
 static int be_setup(struct be_adapter *adapter)
@@ -1648,18 +1658,8 @@ static int be_setup(struct be_adapter *adapter)
 	if (status != 0)
 		goto rx_qs_destroy;
 
-	status = be_vid_config(adapter);
-	if (status != 0)
-		goto mccqs_destroy;
-
-	status = be_cmd_set_flow_control(adapter,
-					adapter->tx_fc, adapter->rx_fc);
-	if (status != 0)
-		goto mccqs_destroy;
 	return 0;
 
-mccqs_destroy:
-	be_mcc_queues_destroy(adapter);
 rx_qs_destroy:
 	be_rx_queues_destroy(adapter);
 tx_qs_destroy:
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 1/2] be2net: fix to set proper flow control on resume
From: Ajit Khaparde @ 2009-11-06 12:06 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

If be2 goes into suspend after a user changes the flow control settings,
we are not programming them back after resume. This patch takes care of it.
We now get the flow control settings before going to suspend mode and
then apply them during resume.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be.h         |    2 ++
 drivers/net/benet/be_ethtool.c |    8 +++++---
 drivers/net/benet/be_main.c    |    8 +++++++-
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index a80da0e..3b79a22 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -259,6 +259,8 @@ struct be_adapter {
 	u32 port_num;
 	bool promiscuous;
 	u32 cap;
+	u32 rx_fc;		/* Rx flow control */
+	u32 tx_fc;		/* Tx flow control */
 };
 
 extern const struct ethtool_ops be_ethtool_ops;
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index cda5bf2..f0fd95b 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -323,10 +323,12 @@ be_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd)
 
 	if (ecmd->autoneg != 0)
 		return -EINVAL;
+	adapter->tx_fc = ecmd->tx_pause;
+	adapter->rx_fc = ecmd->rx_pause;
 
-	status = be_cmd_set_flow_control(adapter, ecmd->tx_pause,
-			ecmd->rx_pause);
-	if (!status)
+	status = be_cmd_set_flow_control(adapter,
+					adapter->tx_fc, adapter->rx_fc);
+	if (status)
 		dev_warn(&adapter->pdev->dev, "Pause param set failed.\n");
 
 	return status;
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 1f941f0..4a7a452 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1652,7 +1652,8 @@ static int be_setup(struct be_adapter *adapter)
 	if (status != 0)
 		goto mccqs_destroy;
 
-	status = be_cmd_set_flow_control(adapter, true, true);
+	status = be_cmd_set_flow_control(adapter,
+					adapter->tx_fc, adapter->rx_fc);
 	if (status != 0)
 		goto mccqs_destroy;
 	return 0;
@@ -1909,6 +1910,10 @@ static void be_netdev_init(struct net_device *netdev)
 
 	adapter->rx_csum = true;
 
+	/* Default settings for Rx and Tx flow control */
+	adapter->rx_fc = true;
+	adapter->tx_fc = true;
+
 	netif_set_gso_max_size(netdev, 65535);
 
 	BE_SET_NETDEV_OPS(netdev, &be_netdev_ops);
@@ -2171,6 +2176,7 @@ static int be_suspend(struct pci_dev *pdev, pm_message_t state)
 		be_close(netdev);
 		rtnl_unlock();
 	}
+	be_cmd_get_flow_control(adapter, &adapter->tx_fc, &adapter->rx_fc);
 	be_clear(adapter);
 
 	pci_save_state(pdev);
-- 
1.6.3.3


^ permalink raw reply related

* Re: [PATCH 0/5] Candidate fix for increased number of GFP_ATOMIC failures V2
From: Tobias Diedrich @ 2009-11-06 11:15 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Frans Pop, Jiri Kosina, Sven Geggus, Karol Lewandowski,
	Tobias Oetiker, Rafael J. Wysocki, David Miller, Reinette Chatre,
	Kalle Valo, David Rientjes, KOSAKI Motohiro, Mohamed Abbas,
	Jens Axboe, John W. Linville, Pekka Enberg,
	Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman,
	Stephan von Krawczynski, Kernel Testers List, netdev,
	linux-kernel, linux-mm@kvack.org
In-Reply-To: <20091106092447.GC25926@csn.ul.ie>

Mel Gorman wrote:
> On Fri, Nov 06, 2009 at 07:03:23AM +0100, Tobias Diedrich wrote:
> > Mel Gorman wrote:
> > > [No BZ ID] Kernel crash on 2.6.31.x (kcryptd: page allocation failure..)
> > > 	This apparently is easily reproducible, particular in comparison to
> > > 	the other reports. The point of greatest interest is that this is
> > > 	order-0 GFP_ATOMIC failures. Sven, I'm hoping that you in particular
> > > 	will be able to follow the tests below as you are the most likely
> > > 	person to have an easily reproducible situation.
> > 
> > I've also seen order-0 failures on 2.6.31.5:
> > Note that this is with a one process hogging and mlocking memory and
> > min_free_kbytes reduced to 100 to reproduce the problem more easily.
> > 
> 
> Is that a vanilla, with patches 1-3 applied or both?
That was on vanilla 2.6.31.5.

I tried 2.6.31.5 before with patches 1+2 and netconsole enabled and
still got the order-1 failures (apparently I get order-1 failures
with netconsole and order-0 failures without).

> > I tried bisecting the issue, but in the end without memory pressure
> > I can't reproduce it reliably and with the above mentioned pressure
> > I get allocation failures even on 2.6.30.o
> 
> To be honest, it's not entirely unexpected with min_free_kbytes set that
> low. The system should cope with a certain amount of pressure but with
> pressure and a low min_free_kbytes, the system will simply be reacting
> too late to free memory in the non-atomic paths.
Maybe I should try again on 2.6.30 without netconsole und try
increasing min_free_kbytes until the allocation failures
disappear and try to bisect again with that setting...

-- 
Tobias						PGP: http://8ef7ddba.uguu.de

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* [PATCH] support static-only systems
From: Mike Frysinger @ 2009-11-06 11:09 UTC (permalink / raw)
  To: stephen.hemminger, netdev

The iptables code supports a "no shared libs" mode where it can be used
without requiring dlfcn related functionality.  This adds similar support
to iproute2 so that it can easily be used on systems like nommu Linux (but
obviously with a few limitations -- no dynamic plugins).

Rather than modify every location that uses dlfcn.h, I hooked the dlfcn.h
header with stub functions when shared library support is disabled.  Then
symbol lookup is done via a local static lookup table (which is generated
automatically at build time) so that internal symbols can be found.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 .gitignore         |    1 +
 Makefile           |    5 +++++
 genl/Makefile      |   15 +++++++++++++++
 genl/static-syms.c |    6 ++++++
 include/dlfcn.h    |   39 +++++++++++++++++++++++++++++++++++++++
 ip/Makefile        |   16 +++++++++++++++-
 ip/static-syms.c   |    6 ++++++
 tc/Makefile        |   23 +++++++++++++++++++----
 tc/m_ipt.c         |    4 ++++
 tc/static-syms.c   |    6 ++++++
 10 files changed, 116 insertions(+), 5 deletions(-)
 create mode 100644 genl/static-syms.c
 create mode 100644 include/dlfcn.h
 create mode 100644 ip/static-syms.c
 create mode 100644 tc/static-syms.c

diff --git a/.gitignore b/.gitignore
index 5a3d20f..390ffb1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 Config
+static-syms.h
 .gdbinit
 .gdb_history
 *.o
diff --git a/Makefile b/Makefile
index 74e9d62..77a85c6 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,12 @@ ARPDDIR=/var/lib/arpd
 # Path to db_185.h include
 DBM_INCLUDE:=$(ROOTDIR)/usr/include
 
+SHARED_LIBS = y
+
 DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
+ifneq ($(SHARED_LIBS),y)
+DEFINES+= -DNO_SHARED_LIBS
+endif
 
 #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
 LDLIBS=-lresolv
diff --git a/genl/Makefile b/genl/Makefile
index 6435875..44bb83c 100644
--- a/genl/Makefile
+++ b/genl/Makefile
@@ -1,6 +1,7 @@
 GENLOBJ=genl.o
 
 include ../Config
+SHARED_LIBS ?= y
 
 GENLMODULES :=
 GENLMODULES += ctrl.o
@@ -9,8 +10,10 @@ GENLOBJ += $(GENLMODULES)
 
 GENLLIB :=
 
+ifeq ($(SHARED_LIBS),y)
 LDFLAGS += -Wl,-export-dynamic
 LDLIBS  += -lm -ldl
+endif
 
 all: genl
 
@@ -21,3 +24,15 @@ install: all
 
 clean:
 	rm -f $(GENLOBJ) $(GENLLIB) genl
+
+ifneq ($(SHARED_LIBS),y)
+
+genl: static-syms.o
+static-syms.o: static-syms.h
+static-syms.h: $(wildcard *.c)
+	files="$^" ; \
+	for s in `grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
+		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
+	done > $@
+
+endif
diff --git a/genl/static-syms.c b/genl/static-syms.c
new file mode 100644
index 0000000..1ed3a8a
--- /dev/null
+++ b/genl/static-syms.c
@@ -0,0 +1,6 @@
+#include <string.h>
+void *_dlsym(const char *sym)
+{
+#include "static-syms.h"
+	return NULL;
+}
diff --git a/include/dlfcn.h b/include/dlfcn.h
new file mode 100644
index 0000000..b0be5a0
--- /dev/null
+++ b/include/dlfcn.h
@@ -0,0 +1,39 @@
+/*
+ * Stub dlfcn implementation for systems that lack shared library support
+ * but obviously can still reference compiled-in symbols.
+ */
+
+#ifndef NO_SHARED_LIBS
+#include_next <dlfcn.h>
+#else
+
+#define RTLD_LAZY 0
+#define _FAKE_DLFCN_HDL (void *)0xbeefcafe
+
+static inline void *dlopen(const char *file, int flag)
+{
+	if (file == NULL)
+		return _FAKE_DLFCN_HDL;
+	else
+		return NULL;
+}
+
+extern void *_dlsym(const char *sym);
+static inline void *dlsym(void *handle, const char *sym)
+{
+	if (handle != _FAKE_DLFCN_HDL)
+		return NULL;
+	return _dlsym(sym);
+}
+
+static inline char *dlerror(void)
+{
+	return NULL;
+}
+
+static inline int dlclose(void *handle)
+{
+	return (handle == _FAKE_DLFCN_HDL) ? 0 : 1;
+}
+
+#endif
diff --git a/ip/Makefile b/ip/Makefile
index 3c185cf..51914e8 100644
--- a/ip/Makefile
+++ b/ip/Makefile
@@ -23,6 +23,20 @@ install: all
 clean:
 	rm -f $(ALLOBJ) $(TARGETS)
 
-LDLIBS += -ldl
+SHARED_LIBS ?= y
+ifeq ($(SHARED_LIBS),y)
 
+LDLIBS += -ldl
 LDFLAGS += -Wl,-export-dynamic
+
+else
+
+ip: static-syms.o
+static-syms.o: static-syms.h
+static-syms.h: $(wildcard *.c)
+	files="$^" ; \
+	for s in `grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
+		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
+	done > $@
+
+endif
diff --git a/ip/static-syms.c b/ip/static-syms.c
new file mode 100644
index 0000000..1ed3a8a
--- /dev/null
+++ b/ip/static-syms.c
@@ -0,0 +1,6 @@
+#include <string.h>
+void *_dlsym(const char *sym)
+{
+#include "static-syms.h"
+	return NULL;
+}
diff --git a/tc/Makefile b/tc/Makefile
index 3ff2535..027055c 100644
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -3,6 +3,7 @@ TCOBJ= tc.o tc_qdisc.o tc_class.o tc_filter.o tc_util.o \
        m_ematch.o emp_ematch.yacc.o emp_ematch.lex.o
 
 include ../Config
+SHARED_LIBS ?= y
 
 TCMODULES :=
 TCMODULES += q_fifo.o
@@ -57,7 +58,12 @@ else
 endif
 
 TCOBJ += $(TCMODULES)
-LDLIBS += -L. -ltc -lm -ldl
+LDLIBS += -L. -ltc -lm
+
+ifeq ($(SHARED_LIBS),y)
+LDLIBS += -ldl
+LDFLAGS += -Wl,-export-dynamic
+endif
 
 TCLIB := tc_core.o
 TCLIB += tc_red.o
@@ -72,9 +78,6 @@ ifeq ($(TC_CONFIG_ATM),y)
   TCSO += q_atm.so
 endif
 
-
-LDFLAGS += -Wl,-export-dynamic
-
 YACC := bison
 LEX := flex
 
@@ -108,3 +111,15 @@ q_atm.so: q_atm.c
 
 %.lex.c: %.l
 	$(LEX) $(LEXFLAGS) -o$@ $<
+
+ifneq ($(SHARED_LIBS),y)
+
+tc: static-syms.o
+static-syms.o: static-syms.h
+static-syms.h: $(wildcard *.c)
+	files="$^" ; \
+	for s in `grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
+		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
+	done > $@
+
+endif
diff --git a/tc/m_ipt.c b/tc/m_ipt.c
index d17d324..99d9965 100644
--- a/tc/m_ipt.c
+++ b/tc/m_ipt.c
@@ -226,6 +226,10 @@ get_target_name(const char *name)
 	struct iptables_target *m;
 	char path[strlen(lib_dir) + sizeof ("/libipt_.so") + strlen(name)];
 
+#ifdef NO_SHARED_LIBS
+	return NULL;
+#endif
+
 	new_name = malloc(strlen(name) + 1);
 	lname = malloc(strlen(name) + 1);
 	if (new_name)
diff --git a/tc/static-syms.c b/tc/static-syms.c
new file mode 100644
index 0000000..1ed3a8a
--- /dev/null
+++ b/tc/static-syms.c
@@ -0,0 +1,6 @@
+#include <string.h>
+void *_dlsym(const char *sym)
+{
+#include "static-syms.h"
+	return NULL;
+}
-- 
1.6.5.1


^ permalink raw reply related

* Re: [PATCH] can: should not use __dev_get_by_index() without locks
From: Oliver Hartkopp @ 2009-11-06 11:04 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David S. Miller, Linux Netdev List
In-Reply-To: <4AF3F905.4030608@gmail.com>

Eric Dumazet wrote:
> David
> 
> A more elegant patch will be possible for 2.6.33, but for 2.6.32,
> I think following patch is needed (Please note I did not test it)
> 
> (More elegant : use RCU lookups ;) , I'll wait for net-next-2.6 
>  upgrade as well)
> 
> Thanks
> 
> [PATCH] can: should not use __dev_get_by_index() without locks
> 
> bcm_proc_getifname() is called with RTNL and dev_base_lock
> not held. It calls __dev_get_by_index() without locks, and
> this is illegal (might crash)
> 
> Close the race by holding dev_base_lock and copying dev->name
> in the protected section.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Thanks for pointing this out.
This is a quite old code section which is not used very often at runtime - and
usually the netdevice is not removed at that time ;-)

Btw. this is no excuse for that missing locking, sorry.

Thanks for the fix!

Compiled and tested successfully.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>



^ permalink raw reply

* [PATCH v2] arpd/ifstat/nstat/rtacct: use daemon()
From: Mike Frysinger @ 2009-11-06 11:04 UTC (permalink / raw)
  To: stephen.hemminger, netdev
In-Reply-To: <1257344795-8665-3-git-send-email-vapier@gentoo.org>

A bunch of misc utils basically reimplement the daemon() function (the
whole fork/close/chdir/etc...).  Rather than do that, use daemon() as
that will work under nommu Linux systems that lack fork().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 misc/arpd.c   |   24 +++---------------------
 misc/ifstat.c |    8 ++++----
 misc/nstat.c  |    8 ++++----
 misc/rtacct.c |    8 ++++----
 4 files changed, 15 insertions(+), 33 deletions(-)

diff --git a/misc/arpd.c b/misc/arpd.c
index 71cd082..128c49d 100644
--- a/misc/arpd.c
+++ b/misc/arpd.c
@@ -775,27 +775,9 @@ int main(int argc, char **argv)
 
 	load_initial_table();
 
-	if (1) {
-		int fd;
-		pid_t pid = fork();
-
-		if (pid > 0)
-			_exit(0);
-		if (pid < 0) {
-			perror("arpd: fork");
-			goto do_abort;
-		}
-
-		chdir("/");
-		fd = open("/dev/null", O_RDWR);
-		if (fd >= 0) {
-			dup2(fd, 0);
-			dup2(fd, 1);
-			dup2(fd, 2);
-			if (fd > 2)
-				close(fd);
-		}
-		setsid();
+	if (daemon(0, 0)) {
+		perror("arpd: daemon");
+		goto do_abort;
 	}
 
 	openlog("arpd", LOG_PID | LOG_CONS, LOG_DAEMON);
diff --git a/misc/ifstat.c b/misc/ifstat.c
index 68dfdee..0ce8c92 100644
--- a/misc/ifstat.c
+++ b/misc/ifstat.c
@@ -663,10 +663,10 @@ int main(int argc, char *argv[])
 			perror("ifstat: listen");
 			exit(-1);
 		}
-		if (fork())
-			exit(0);
-		chdir("/");
-		close(0); close(1); close(2); setsid();
+		if (daemon(0, 0)) {
+			perror("ifstat: daemon");
+			exit(-1);
+		}
 		signal(SIGPIPE, SIG_IGN);
 		signal(SIGCHLD, sigchild);
 		server_loop(fd);
diff --git a/misc/nstat.c b/misc/nstat.c
index 80e695f..2e44ed2 100644
--- a/misc/nstat.c
+++ b/misc/nstat.c
@@ -513,10 +513,10 @@ int main(int argc, char *argv[])
 			perror("nstat: listen");
 			exit(-1);
 		}
-		if (fork())
-			exit(0);
-		chdir("/");
-		close(0); close(1); close(2); setsid();
+		if (daemon(0, 0)) {
+			perror("nstat: daemon");
+			exit(-1);
+		}
 		signal(SIGPIPE, SIG_IGN);
 		signal(SIGCHLD, sigchild);
 		server_loop(fd);
diff --git a/misc/rtacct.c b/misc/rtacct.c
index eb3ea9e..a247dfd 100644
--- a/misc/rtacct.c
+++ b/misc/rtacct.c
@@ -524,10 +524,10 @@ int main(int argc, char *argv[])
 			perror("rtacct: listen");
 			exit(-1);
 		}
-		if (fork())
-			exit(0);
-		chdir("/");
-		close(0); close(1); close(2); setsid();
+		if (daemon(0, 0)) {
+			perror("rtacct: daemon");
+			exit(-1);
+		}
 		signal(SIGPIPE, SIG_IGN);
 		signal(SIGCHLD, sigchild);
 		server_loop(fd);
-- 
1.6.5.1


^ permalink raw reply related

* [PATCH net-next2.6] ipv6: avoid dev_hold()/dev_put() in rawv6_bind()
From: Eric Dumazet @ 2009-11-06 10:53 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

Using RCU helps not touching device refcount in rawv6_bind()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/ipv6/raw.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 818ef21..80f356a 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -249,7 +249,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 
 	/* Raw sockets are IPv6 only */
 	if (addr_type == IPV6_ADDR_MAPPED)
-		return(-EADDRNOTAVAIL);
+		return -EADDRNOTAVAIL;
 
 	lock_sock(sk);
 
@@ -257,6 +257,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 	if (sk->sk_state != TCP_CLOSE)
 		goto out;
 
+	rcu_read_unlock();
 	/* Check if the address belongs to the host. */
 	if (addr_type != IPV6_ADDR_ANY) {
 		struct net_device *dev = NULL;
@@ -272,13 +273,13 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 
 			/* Binding to link-local address requires an interface */
 			if (!sk->sk_bound_dev_if)
-				goto out;
+				goto out_unlock;
 
-			dev = dev_get_by_index(sock_net(sk), sk->sk_bound_dev_if);
-			if (!dev) {
-				err = -ENODEV;
-				goto out;
-			}
+			err = -ENODEV;
+			dev = dev_get_by_index_rcu(sock_net(sk),
+						   sk->sk_bound_dev_if);
+			if (!dev)
+				goto out_unlock;
 		}
 
 		/* ipv4 addr of the socket is invalid.  Only the
@@ -289,13 +290,9 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 			err = -EADDRNOTAVAIL;
 			if (!ipv6_chk_addr(sock_net(sk), &addr->sin6_addr,
 					   dev, 0)) {
-				if (dev)
-					dev_put(dev);
-				goto out;
+				goto out_unlock;
 			}
 		}
-		if (dev)
-			dev_put(dev);
 	}
 
 	inet->inet_rcv_saddr = inet->inet_saddr = v4addr;
@@ -303,6 +300,8 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 	if (!(addr_type & IPV6_ADDR_MULTICAST))
 		ipv6_addr_copy(&np->saddr, &addr->sin6_addr);
 	err = 0;
+out_unlock:
+	rcu_read_unlock();
 out:
 	release_sock(sk);
 	return err;

^ permalink raw reply related

* [PATCH] can: should not use __dev_get_by_index() without locks
From: Eric Dumazet @ 2009-11-06 10:23 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

David

A more elegant patch will be possible for 2.6.33, but for 2.6.32,
I think following patch is needed (Please note I did not test it)

(More elegant : use RCU lookups ;) , I'll wait for net-next-2.6 
 upgrade as well)

Thanks

[PATCH] can: should not use __dev_get_by_index() without locks

bcm_proc_getifname() is called with RTNL and dev_base_lock
not held. It calls __dev_get_by_index() without locks, and
this is illegal (might crash)

Close the race by holding dev_base_lock and copying dev->name
in the protected section.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/can/bcm.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/net/can/bcm.c b/net/can/bcm.c
index 597da4f..e8d58f3 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -132,23 +132,27 @@ static inline struct bcm_sock *bcm_sk(const struct sock *sk)
 /*
  * procfs functions
  */
-static char *bcm_proc_getifname(int ifindex)
+static char *bcm_proc_getifname(char *result, int ifindex)
 {
 	struct net_device *dev;
 
 	if (!ifindex)
 		return "any";
 
-	/* no usage counting */
+	read_lock(&dev_base_lock);
 	dev = __dev_get_by_index(&init_net, ifindex);
 	if (dev)
-		return dev->name;
+		strcpy(result, dev->name);
+	else
+		strcpy(result, "???");
+	read_unlock(&dev_base_lock);
 
-	return "???";
+	return result;
 }
 
 static int bcm_proc_show(struct seq_file *m, void *v)
 {
+	char ifname[IFNAMSIZ];
 	struct sock *sk = (struct sock *)m->private;
 	struct bcm_sock *bo = bcm_sk(sk);
 	struct bcm_op *op;
@@ -157,7 +161,7 @@ static int bcm_proc_show(struct seq_file *m, void *v)
 	seq_printf(m, " / sk %p", sk);
 	seq_printf(m, " / bo %p", bo);
 	seq_printf(m, " / dropped %lu", bo->dropped_usr_msgs);
-	seq_printf(m, " / bound %s", bcm_proc_getifname(bo->ifindex));
+	seq_printf(m, " / bound %s", bcm_proc_getifname(ifname, bo->ifindex));
 	seq_printf(m, " <<<\n");
 
 	list_for_each_entry(op, &bo->rx_ops, list) {
@@ -169,7 +173,7 @@ static int bcm_proc_show(struct seq_file *m, void *v)
 			continue;
 
 		seq_printf(m, "rx_op: %03X %-5s ",
-				op->can_id, bcm_proc_getifname(op->ifindex));
+				op->can_id, bcm_proc_getifname(ifname, op->ifindex));
 		seq_printf(m, "[%d]%c ", op->nframes,
 				(op->flags & RX_CHECK_DLC)?'d':' ');
 		if (op->kt_ival1.tv64)
@@ -194,7 +198,8 @@ static int bcm_proc_show(struct seq_file *m, void *v)
 	list_for_each_entry(op, &bo->tx_ops, list) {
 
 		seq_printf(m, "tx_op: %03X %s [%d] ",
-				op->can_id, bcm_proc_getifname(op->ifindex),
+				op->can_id,
+				bcm_proc_getifname(ifname, op->ifindex),
 				op->nframes);
 
 		if (op->kt_ival1.tv64)

^ permalink raw reply related

* Re: netfilter 02/02: xt_connlimit: fix regression caused by zero family value
From: Jan Engelhardt @ 2009-11-06 10:17 UTC (permalink / raw)
  To: David Miller; +Cc: kaber, netfilter-devel, netdev
In-Reply-To: <20091106.004418.54906158.davem@davemloft.net>


On Friday 2009-11-06 09:44, David Miller wrote:

>From: Jan Engelhardt <jengelh@medozas.de>
>Date: Thu, 5 Nov 2009 19:45:25 +0100 (CET)
>
>> On Thursday 2009-11-05 19:23, Patrick McHardy wrote:
>>>
>>>    netfilter: xt_connlimit: fix regression caused by zero family value
>>>    
>>>    Commit v2.6.28-rc1~7172~1092~2 was slightly incomplete; not all
>>>    instances of par->match->family were changed to par->family.
>>>    
>>>    Netfilter bugzilla #610.
>> 
>> Hold it.
>> git would never output ~7172~1092~2 because ~8266 would be much simpler.
>> 
>> I originally wrote "Commit v2.6.28-rc1~717^2~109^2~2", but one of your 
>> programs seems to eat commit messages or more.
>
>Guys, please sort this out so I can add this fix to net-2.6
>
>Thanks.

This should.


commit ffffffffffffffffffffffffffffffffffffffff
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Wed Nov 4 14:27:30 2009 +0100

netfilter: xt_connlimit: fix regression caused by zero family value
Commit v2.6.28-rc1~717^2~109^2~2 was slightly incomplete; not all
instances of par->match->family were changed to par->family.

References: http://bugzilla.netfilter.org/show_bug.cgi?id=610
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
 net/netfilter/xt_connlimit.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 6809809..38f03f7 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -103,7 +103,7 @@ static int count_them(struct xt_connlimit_data *data,
 		      const struct nf_conntrack_tuple *tuple,
 		      const union nf_inet_addr *addr,
 		      const union nf_inet_addr *mask,
-		      const struct xt_match *match)
+		      u_int8_t family)
 {
 	const struct nf_conntrack_tuple_hash *found;
 	struct xt_connlimit_conn *conn;
@@ -113,8 +113,7 @@ static int count_them(struct xt_connlimit_data *data,
 	bool addit = true;
 	int matches = 0;
 
-
-	if (match->family == NFPROTO_IPV6)
+	if (family == NFPROTO_IPV6)
 		hash = &data->iphash[connlimit_iphash6(addr, mask)];
 	else
 		hash = &data->iphash[connlimit_iphash(addr->ip & mask->ip)];
@@ -157,8 +156,7 @@ static int count_them(struct xt_connlimit_data *data,
 			continue;
 		}
 
-		if (same_source_net(addr, mask, &conn->tuple.src.u3,
-		    match->family))
+		if (same_source_net(addr, mask, &conn->tuple.src.u3, family))
 			/* same source network -> be counted! */
 			++matches;
 		nf_ct_put(found_ct);
@@ -207,7 +205,7 @@ connlimit_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 
 	spin_lock_bh(&info->data->lock);
 	connections = count_them(info->data, tuple_ptr, &addr,
-	                         &info->mask, par->match);
+	                         &info->mask, par->family);
 	spin_unlock_bh(&info->data->lock);
 
 	if (connections < 0) {
-- 
# Created with git-export-patch

^ permalink raw reply related

* Re: [RFC] move dma_head/dma_maps out of skb_shared_info and into sk_buff
From: David Miller @ 2009-11-06  9:58 UTC (permalink / raw)
  To: alexander.duyck; +Cc: alexander.h.duyck, netdev
In-Reply-To: <1257476452.14523.10.camel@localhost>

From: Alexander Duyck <alexander.duyck@gmail.com>
Date: Thu, 05 Nov 2009 19:00:52 -0800

> Would there be any complaint if I were to submit a patch that removed
> skb_dma_map/unmap?

I'm still thinking about exactly what to do here.  In the meantime
feel free to toss this skb_dma_{map,unmap}() removal patch together.

Thanks.

^ permalink raw reply

* Re: [PATCH 0/5] Candidate fix for increased number of GFP_ATOMIC failures V2
From: Mel Gorman @ 2009-11-06  9:24 UTC (permalink / raw)
  To: Tobias Diedrich, Frans Pop, Jiri Kosina, Sven Geggus,
	Karol Lewandowski <karol.k.lewand
In-Reply-To: <20091106060323.GA5528@yumi.tdiedrich.de>

On Fri, Nov 06, 2009 at 07:03:23AM +0100, Tobias Diedrich wrote:
> Mel Gorman wrote:
> > [No BZ ID] Kernel crash on 2.6.31.x (kcryptd: page allocation failure..)
> > 	This apparently is easily reproducible, particular in comparison to
> > 	the other reports. The point of greatest interest is that this is
> > 	order-0 GFP_ATOMIC failures. Sven, I'm hoping that you in particular
> > 	will be able to follow the tests below as you are the most likely
> > 	person to have an easily reproducible situation.
> 
> I've also seen order-0 failures on 2.6.31.5:
> Note that this is with a one process hogging and mlocking memory and
> min_free_kbytes reduced to 100 to reproduce the problem more easily.
> 

Is that a vanilla, with patches 1-3 applied or both?

> I tried bisecting the issue, but in the end without memory pressure
> I can't reproduce it reliably and with the above mentioned pressure
> I get allocation failures even on 2.6.30.o
> 

To be honest, it's not entirely unexpected with min_free_kbytes set that
low. The system should cope with a certain amount of pressure but with
pressure and a low min_free_kbytes, the system will simply be reacting
too late to free memory in the non-atomic paths.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

^ permalink raw reply

* [PATCH 1/1] NET: cassini, fix lock imbalance
From: Jiri Slaby @ 2009-11-06  9:14 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, Jiri Slaby

Stanse found that one error path in cas_open omits to unlock pm_mutex.
Fix that.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
 drivers/net/cassini.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 05916aa..f857afe 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -4342,11 +4342,11 @@ static int cas_open(struct net_device *dev)
 		cas_unlock_all_restore(cp, flags);
 	}
 
+	err = -ENOMEM;
 	if (cas_tx_tiny_alloc(cp) < 0)
-		return -ENOMEM;
+		goto err_unlock;
 
 	/* alloc rx descriptors */
-	err = -ENOMEM;
 	if (cas_alloc_rxds(cp) < 0)
 		goto err_tx_tiny;
 
@@ -4386,6 +4386,7 @@ err_spare:
 	cas_free_rxds(cp);
 err_tx_tiny:
 	cas_tx_tiny_free(cp);
+err_unlock:
 	mutex_unlock(&cp->pm_mutex);
 	return err;
 }
-- 
1.6.4.2


^ permalink raw reply related

* Re: [PATCH] decnet: netdevice refcount leak
From: David Miller @ 2009-11-06  9:07 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <4AF3E1B3.8070204@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 06 Nov 2009 09:43:31 +0100

> David, if you accept the following patch for net-2.6, it would help me
> if you also can pull it in net-next-2.6

Applied to net-2.6, and net-2.6 is now merged into net-next-2.6,
thanks.

^ permalink raw reply

* Re: WARNING: at net/ipv4/af_inet.c:154 inet_sock_destruct
From: David Miller @ 2009-11-06  8:58 UTC (permalink / raw)
  To: eric.dumazet; +Cc: francis.moro, linux-kernel, netdev
In-Reply-To: <4AF3E2A9.2020601@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 06 Nov 2009 09:47:37 +0100

> Francis Moreau a écrit :
>> On Fri, Oct 30, 2009 at 4:03 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> 
>> [...]
>> 
>>> [PATCH take2] net: fix sk_forward_alloc corruption
>>>
>> 
>> With this patch applied 4 days ago, I haven't got any oops so far.
>
> Thanks a lot for testing and report Francis, I believe David will
> push it for stable (if not already done)

I'm pretty sure it's already in Greg's current batch, but if it
doesn't show up in his next -stable release I'll make sure to
submit it.

^ permalink raw reply

* Re: [RFC] netlink: add socket destruction notification
From: Johannes Berg @ 2009-11-06  8:55 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, j, tgraf
In-Reply-To: <20091105.210806.40981707.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

On Thu, 2009-11-05 at 21:08 -0800, David Miller wrote:

> > When we want to keep track of resources associated with applications, we
> > need to know when an app is going away. Add a notification function to
> > netlink that tells us that, and also hook it up to generic netlink so
> > generic netlink can notify the families. Due to the way generic netlink
> > works though, we need to notify all families and they have to sort out
> > whatever resources some commands associated with the socket themselves.

> No fundamental objections.

:)

> However, as a followup, netlink_kernel_create() is becomming
> function_that_takes_too_many_arguments().
> 
> At this point it's better to just pass two arguments, the network
> namespace pointer, and a pointer to a "const struct netlink_kern_info"
> that holds the rest of the parameters.
> 
> Could you make that change too?

Yeah, I agree -- will change.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: PATCH: Network Device Naming mechanism and policy
From: Marco d'Itri @ 2009-11-06  8:49 UTC (permalink / raw)
  To: Narendra_K
  Cc: bryan, dannf, bhutchings, netdev, linux-hotplug, Matt_Domsch,
	Jordan_Hargrave, Charles_Rose, Sandeep_K_Shandilya
In-Reply-To: <EDA0A4495861324DA2618B4C45DCB3EE5896D2@blrx3m08.blr.amer.dell.com>

On Nov 04, Narendra_K@Dell.com wrote:

> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{smbios_name}=="Embedded_NIC_1", ATTR{type}=="1", KERNEL=="eth*",
> NAME="eth0".
As a distribution developer I highly value solutions like this which do
not require patching every application which deals with interface names
and then teaching users about aliases which only work in some places and
are unknown to the kernel.

-- 
ciao,
Marco

^ permalink raw reply

* Re: WARNING: at net/ipv4/af_inet.c:154 inet_sock_destruct
From: Eric Dumazet @ 2009-11-06  8:47 UTC (permalink / raw)
  To: Francis Moreau
  Cc: Linux Kernel Mailing List, Linux Netdev List, David S. Miller
In-Reply-To: <38b2ab8a0911060045hb6ebab8p43bf8aa838eabfd3@mail.gmail.com>

Francis Moreau a écrit :
> On Fri, Oct 30, 2009 at 4:03 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
> [...]
> 
>> [PATCH take2] net: fix sk_forward_alloc corruption
>>
> 
> With this patch applied 4 days ago, I haven't got any oops so far.

Thanks a lot for testing and report Francis, I believe David will push it for stable
(if not already done)



^ permalink raw reply

* Re: WARNING: at net/ipv4/af_inet.c:154 inet_sock_destruct
From: Francis Moreau @ 2009-11-06  8:45 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Linux Kernel Mailing List, Linux Netdev List, David S. Miller
In-Reply-To: <4AEB0059.1050400@gmail.com>

On Fri, Oct 30, 2009 at 4:03 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:

[...]

>
> [PATCH take2] net: fix sk_forward_alloc corruption
>

With this patch applied 4 days ago, I haven't got any oops so far.
-- 
Francis

^ permalink raw reply

* Re: netfilter 02/02: xt_connlimit: fix regression caused by zero family value
From: David Miller @ 2009-11-06  8:44 UTC (permalink / raw)
  To: jengelh; +Cc: kaber, netfilter-devel, netdev
In-Reply-To: <alpine.LSU.2.00.0911051943130.25147@obet.zrqbmnf.qr>

From: Jan Engelhardt <jengelh@medozas.de>
Date: Thu, 5 Nov 2009 19:45:25 +0100 (CET)

> On Thursday 2009-11-05 19:23, Patrick McHardy wrote:
>>
>>    netfilter: xt_connlimit: fix regression caused by zero family value
>>    
>>    Commit v2.6.28-rc1~7172~1092~2 was slightly incomplete; not all
>>    instances of par->match->family were changed to par->family.
>>    
>>    Netfilter bugzilla #610.
> 
> Hold it.
> git would never output ~7172~1092~2 because ~8266 would be much simpler.
> 
> I originally wrote "Commit v2.6.28-rc1~717^2~109^2~2", but one of your 
> programs seems to eat commit messages or more.

Guys, please sort this out so I can add this fix to net-2.6

Thanks.

^ permalink raw reply

* Re: [PATCH net-next-2.6] mac80211: Speedup ieee80211_remove_interfaces()
From: David Miller @ 2009-11-06  8:44 UTC (permalink / raw)
  To: johannes; +Cc: eric.dumazet, netdev, linville
In-Reply-To: <1257446408.29454.4.camel@johannes.local>

From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu, 05 Nov 2009 19:40:07 +0100

> On Thu, 2009-11-05 at 11:06 +0100, Eric Dumazet wrote:
>> Speedup ieee80211_remove_interfaces() by factorizing synchronize_rcu() calls
> 
> Jouni will be pleased for his testing... :)
> 
> Looks good to me. Nice simplification too.
> 
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> 

I'll leave it to John to integrate this, thanks guys.

^ permalink raw reply

* [PATCH] decnet: netdevice refcount leak
From: Eric Dumazet @ 2009-11-06  8:43 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

David, if you accept the following patch for net-2.6, it would help me
if you also can pull it in net-next-2.6

Thanks

[PATCH] decnet: netdevice refcount leak

While working on device refcount stuff, I found a device refcount leak
through DECNET.
This nasty bug can be used to hold refcounts on any !DECNET netdevice.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/decnet/sysctl_net_decnet.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
index 26b0ab1..2036568 100644
--- a/net/decnet/sysctl_net_decnet.c
+++ b/net/decnet/sysctl_net_decnet.c
@@ -263,11 +263,10 @@ static int dn_def_dev_strategy(ctl_table *table,
 			return -ENODEV;
 
 		rv = -ENODEV;
-		if (dev->dn_ptr != NULL) {
+		if (dev->dn_ptr != NULL)
 			rv = dn_dev_set_default(dev, 1);
-			if (rv)
-				dev_put(dev);
-		}
+		if (rv)
+			dev_put(dev);
 	}
 
 	return rv;

^ permalink raw reply related

* Re: netfilter 01/02: nf_nat: fix NAT issue in 2.6.30.4+
From: David Miller @ 2009-11-06  8:43 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel, netdev
In-Reply-To: <4AF31832.1070701@trash.net>

From: Patrick McHardy <kaber@trash.net>
Date: Thu, 05 Nov 2009 19:23:46 +0100

>     netfilter: nf_nat: fix NAT issue in 2.6.30.4+
 ...
>     Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
>     Signed-off-by: Patrick McHardy <kaber@trash.net>

Applied to net-2.6

^ 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