* Re: [PATCH 2/2] cfg80211: fix wireless handlers assignment
From: Johannes Berg @ 2009-09-28 7:54 UTC (permalink / raw)
To: Hugh Dickins; +Cc: netdev, linux-wireless
In-Reply-To: <Pine.LNX.4.64.0909272237190.4098@sister.anvils>
[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]
On Sun, 2009-09-27 at 22:50 +0100, Hugh Dickins wrote:
> On Sun, 27 Sep 2009, Hugh Dickins wrote:
> >
> > I've experimented by moving your NETDEV_PRE_INIT hunk later in the
> > sequence, just before the netdev_initialize_kobject(dev) (so I also
> > changed the "goto out" to "goto err_uninit"): both* machines then boot
> > correctly, and this mail leaves me wirelessly.
> >
> > I'll now experiment to see how early I can move that hunk.
>
> Both machines boot (and do wireless) correctly with your NETDEV_PRE_INIT
> hunk placed just after the ndo_init block, instead of just before where
> you placed it. That's i386 kernels on both.
>
> But curiouser and curiouser... the laptop can do 64-bit, so I built
> my 64-bit kernel, and went through the motions to reproduce the
> early boot crash with the patch as you had it: but the x86_64 kernel
> boots (and does wireless) correctly with the NETDEV_PRE_INIT hunk
> just where you placed it, before the ndo_init block.
>
> Perhaps there's a difference in the 32- and 64-bit startup sequence
> with respect to notifiers; or perhaps your change tickles another bug.
> I don't know, I'm turning off now.
Interesting, thanks for taking the time to test. I'll post an updated
patchset that calls it POST_INIT and moves it to there.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [PATCH 1/2] net: introduce NETDEV_POST_INIT notifier
From: Johannes Berg @ 2009-09-28 8:21 UTC (permalink / raw)
To: netdev; +Cc: linux-wireless, Hugh Dickins
For various purposes including a wireless extensions
bugfix, we need to hook into the netdev creation before
before netdev_register_kobject(). This will also ease
doing the dev type assignment that Marcel was working
on for cfg80211 drivers w/o touching them all.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
I decided that it doesn't make a lot of sense to be after ndo_init but
before the other name/... checks.
include/linux/notifier.h | 1 +
net/core/dev.c | 5 +++++
2 files changed, 6 insertions(+)
--- wireless-testing.orig/include/linux/notifier.h 2009-09-28 10:14:54.000000000 +0200
+++ wireless-testing/include/linux/notifier.h 2009-09-28 10:16:07.000000000 +0200
@@ -201,6 +201,7 @@ static inline int notifier_to_errno(int
#define NETDEV_PRE_UP 0x000D
#define NETDEV_BONDING_OLDTYPE 0x000E
#define NETDEV_BONDING_NEWTYPE 0x000F
+#define NETDEV_POST_INIT 0x0010
#define SYS_DOWN 0x0001 /* Notify of system down */
#define SYS_RESTART SYS_DOWN
--- wireless-testing.orig/net/core/dev.c 2009-09-28 10:14:54.000000000 +0200
+++ wireless-testing/net/core/dev.c 2009-09-28 10:20:46.000000000 +0200
@@ -4785,6 +4785,11 @@ int register_netdevice(struct net_device
if (dev->features & NETIF_F_SG)
dev->features |= NETIF_F_GSO;
+ ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev);
+ ret = notifier_to_errno(ret);
+ if (ret)
+ goto err_uninit;
+
netdev_initialize_kobject(dev);
ret = netdev_register_kobject(dev);
if (ret)
^ permalink raw reply
* [PATCH 2/2] cfg80211: fix wireless handlers assignment
From: Johannes Berg @ 2009-09-28 8:21 UTC (permalink / raw)
To: netdev; +Cc: Hugh Dickins, linux-wireless
The point we assign dev->wireless_handlers at is too
late, we need to do that before netdev_register_kobject()
gets called, so use the new NETDEV_PRE_INIT notifier.
The result of adding wireless_handlers too late is the
disappearance of /sys/class/net/wlan0/wireless which a
bunch of distro scripts still require.
Signed-off-by: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
---
net/wireless/core.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- wireless-testing.orig/net/wireless/core.c 2009-09-28 09:54:52.000000000 +0200
+++ wireless-testing/net/wireless/core.c 2009-09-28 10:18:47.000000000 +0200
@@ -641,6 +641,12 @@ static int cfg80211_netdev_notifier_call
WARN_ON(wdev->iftype == NL80211_IFTYPE_UNSPECIFIED);
switch (state) {
+ case NETDEV_POST_INIT:
+#ifdef CONFIG_WIRELESS_EXT
+ if (!dev->wireless_handlers)
+ dev->wireless_handlers = &cfg80211_wext_handler;
+#endif
+ break;
case NETDEV_REGISTER:
/*
* NB: cannot take rdev->mtx here because this may be
@@ -666,8 +672,6 @@ static int cfg80211_netdev_notifier_call
wdev->sme_state = CFG80211_SME_IDLE;
mutex_unlock(&rdev->devlist_mtx);
#ifdef CONFIG_WIRELESS_EXT
- if (!dev->wireless_handlers)
- dev->wireless_handlers = &cfg80211_wext_handler;
wdev->wext.default_key = -1;
wdev->wext.default_mgmt_key = -1;
wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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] atm: dereference of he_dev->rbps_virt in he_init_group()
From: Roel Kluin @ 2009-09-28 8:58 UTC (permalink / raw)
To: David Miller; +Cc: joe, chas, linux-atm-general, netdev, akpm
In-Reply-To: <20090926.202636.105018102.davem@davemloft.net>
From: Juha Leppanen <juha_motorsportcom@luukku.com>
Date: Sat, Sep 26, 2009 at 12:34 AM
Subject: atm: he: memleak/negative indexing of arrays in he_init_group()
The prefix decrement causes a very long loop if pci_pool_alloc() failed
in the first iteration. Also I swapped rbps and rbpl arguments.
Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 29e66d6..7066703 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -921,9 +921,9 @@ out_free_rbpq_base:
he_dev->rbrq_phys);
i = CONFIG_RBPL_SIZE;
out_free_rbpl_virt:
- while (--i)
- pci_pool_free(he_dev->rbps_pool, he_dev->rbpl_virt[i].virt,
- he_dev->rbps_base[i].phys);
+ while (i--)
+ pci_pool_free(he_dev->rbpl_pool, he_dev->rbpl_virt[i].virt,
+ he_dev->rbpl_base[i].phys);
kfree(he_dev->rbpl_virt);
out_free_rbpl_base:
@@ -933,11 +933,11 @@ out_free_rbpl_base:
out_destroy_rbpl_pool:
pci_pool_destroy(he_dev->rbpl_pool);
- i = CONFIG_RBPL_SIZE;
+ i = CONFIG_RBPS_SIZE;
out_free_rbps_virt:
- while (--i)
- pci_pool_free(he_dev->rbpl_pool, he_dev->rbps_virt[i].virt,
- he_dev->rbpl_base[i].phys);
+ while (i--)
+ pci_pool_free(he_dev->rbps_pool, he_dev->rbps_virt[i].virt,
+ he_dev->rbps_base[i].phys);
kfree(he_dev->rbps_virt);
out_free_rbps_base:
^ permalink raw reply related
* Re: [PATCH 1/2] net: introduce NETDEV_POST_INIT notifier
From: Johannes Berg @ 2009-09-28 9:29 UTC (permalink / raw)
To: netdev; +Cc: linux-wireless, Hugh Dickins, Marcel Holtmann
In-Reply-To: <1254126089.6583.18.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 691 bytes --]
On Mon, 2009-09-28 at 10:21 +0200, Johannes Berg wrote:
> For various purposes including a wireless extensions
> bugfix, we need to hook into the netdev creation before
> before netdev_register_kobject(). This will also ease
> doing the dev type assignment that Marcel was working
> on for cfg80211 drivers w/o touching them all.
>
> Signed-off-by: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
> ---
> I decided that it doesn't make a lot of sense to be after ndo_init but
> before the other name/... checks.
Ignore this patch please, I have something better. Marcel, feel free to
pick this up once you continue working on your devtype thing.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] cfg80211: fix wireless handlers assignment
From: Johannes Berg @ 2009-09-28 9:29 UTC (permalink / raw)
To: netdev; +Cc: Hugh Dickins, linux-wireless
In-Reply-To: <1254126117.6583.19.camel@johannes.local>
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
On Mon, 2009-09-28 at 10:21 +0200, Johannes Berg wrote:
> The point we assign dev->wireless_handlers at is too
> late, we need to do that before netdev_register_kobject()
> gets called, so use the new NETDEV_PRE_INIT notifier.
> The result of adding wireless_handlers too late is the
> disappearance of /sys/class/net/wlan0/wireless which a
> bunch of distro scripts still require.
Ignore please, I have a better, self-contained fix.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH] ax25: Fix possible oops in ax25_make_new
From: Bernard Pidoux F6BVP @ 2009-09-28 10:47 UTC (permalink / raw)
To: Jarek Poplawski
Cc: Ralf Baechle DL5RB, David Miller, Bernard Pidoux,
Linux Netdev List, linux-hams
In-Reply-To: <20090927205701.GA7205@del.dom.local>
Applied.
Thanks.
Bernard
Jarek Poplawski a écrit :
> In ax25_make_new, if kmemdup of digipeat returns an error, there would
> be an oops in sk_free while calling sk_destruct, because sk_protinfo
> is NULL at the moment; move sk->sk_destruct initialization after this.
>
> BTW of reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
> ---
>
> net/ax25/af_ax25.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
> index fbcac76..9884639 100644
> --- a/net/ax25/af_ax25.c
> +++ b/net/ax25/af_ax25.c
> @@ -900,7 +900,6 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev)
>
> sock_init_data(NULL, sk);
>
> - sk->sk_destruct = ax25_free_sock;
> sk->sk_type = osk->sk_type;
> sk->sk_priority = osk->sk_priority;
> sk->sk_protocol = osk->sk_protocol;
> @@ -938,6 +937,7 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev)
> }
>
> sk->sk_protinfo = ax25;
> + sk->sk_destruct = ax25_free_sock;
> ax25->sk = sk;
>
> return sk;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] ax25: Add missing dev_put in ax25_setsockopt
From: Bernard Pidoux F6BVP @ 2009-09-28 10:48 UTC (permalink / raw)
To: Jarek Poplawski
Cc: David Miller, Bernard Pidoux, Ralf Baechle DL5RB,
Linux Netdev List, linux-hams
In-Reply-To: <20090928071211.GA8658@ff.dom.local>
I had noticed dev_put(dev) was missing but never found where to insert it !
Patch applied.
Thank you.
Bernard
Jarek Poplawski a écrit :
> There is no dev_put ending positive SO_BINDTODEVICE call in
> ax25_setsockopt and no matching dev_put later. This ref isn't used by
> ax25_cb's because it's handled with up and down device events.
>
> BTW of reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
> ---
>
> net/ax25/af_ax25.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
> index fbcac76..3eee8eb 100644
> --- a/net/ax25/af_ax25.c
> +++ b/net/ax25/af_ax25.c
> @@ -663,6 +663,7 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
>
> ax25->ax25_dev = ax25_dev_ax25dev(dev);
> ax25_fillin_cb(ax25, ax25->ax25_dev);
> + dev_put(dev);
> break;
>
> default:
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply
* [Fwd: Re: Bug#538372: header failure including netlink.h (or uio.h)]
From: Manuel Prinz @ 2009-09-28 11:24 UTC (permalink / raw)
To: netdev
Hi everyone,
I'm forwarding this bug in Debian (http://bugs.debian.org/538372) as
requested by the Debian kernel team. A patch is available. Applying just
the first hunk fixes the issue for me. I've not enough kernel knowledge
to judge if this fix is a proper solution, though.
It would be really great if someone could have a look at it. Thanks in
advance! (And please CC me in replies. Thanks!)
Best regards,
Manuel
-------- Weitergeleitete Nachricht --------
> Von: Moritz Muehlenhoff <jmm@inutil.org>
> An: Manuel Prinz <manuel@debian.org>
> Kopie: Moritz Muehlenhoff <jmm@inutil.org>, 538372@bugs.debian.org
> Betreff: Re: Bug#538372: header failure including netlink.h (or uio.h)
> Datum: Sun, 27 Sep 2009 13:30:10 +0200
>
> On Fri, Sep 18, 2009 at 10:59:19PM +0200, Manuel Prinz wrote:
> > Am Dienstag, den 01.09.2009, 18:53 +0200 schrieb Moritz Muehlenhoff:
> > > On Sat, Jul 25, 2009 at 01:55:04PM +0200, Bastian Blank wrote:
> > > > Patches attached:
> > > > * Fix uio.h
> > > > * Remove socket.h backward compatibility code.
> > >
> > > uio.h has been marked __KERNEL__-only upstream in commit
> > > 812ed032cdc8138b7546eecc996879756b92d801.
> > >
> > > Did you submit your socket.h patch upstream?
> >
> > I am bitten by that bug as well. The change in uio.h did not fix it. I
> > updated the patch for socket.h (attached) but I'm not sure if all
> > changes are needed, though. Applying only the first hunk (#ifdef line)
> > fixed all build issue for me.
>
> Can you please forward this upstream? I suppose netdev@vger.kernel.org would
> be the best list to contact.
>
> Cheers,
> Moritz
^ permalink raw reply
* [PATCH] ax25: Add missing dev_put in ax25_setsockopt
From: Ralf Baechle @ 2009-09-28 12:53 UTC (permalink / raw)
To: Jarek Poplawski
Cc: David Miller, Bernard Pidoux F6BVP, Bernard Pidoux,
Linux Netdev List, linux-hams
In-Reply-To: <20090928071211.GA8658@ff.dom.local>
ax25_setsockopt SO_BINDTODEVICE is missing a dev_put call in case of
success. Re-order code to fix this bug. While at it also reformat two
lines of code to comply with the Linux coding style.
Initial patch by Jarek Poplawski <jarkao2@gmail.com>.
Reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
Counter-proposal. Reordering all the code avoids the need for a 2nd dev_put
and is more readable.
Ralf
net/ax25/af_ax25.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index fbcac76..4102de1 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -641,15 +641,10 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
case SO_BINDTODEVICE:
if (optlen > IFNAMSIZ)
- optlen=IFNAMSIZ;
- if (copy_from_user(devname, optval, optlen)) {
- res = -EFAULT;
- break;
- }
+ optlen = IFNAMSIZ;
- dev = dev_get_by_name(&init_net, devname);
- if (dev == NULL) {
- res = -ENODEV;
+ if (copy_from_user(devname, optval, optlen)) {
+ res = -EFAULT;
break;
}
@@ -657,12 +652,18 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
(sock->state != SS_UNCONNECTED ||
sk->sk_state == TCP_LISTEN)) {
res = -EADDRNOTAVAIL;
- dev_put(dev);
+ break;
+ }
+
+ dev = dev_get_by_name(&init_net, devname);
+ if (!dev) {
+ res = -ENODEV;
break;
}
ax25->ax25_dev = ax25_dev_ax25dev(dev);
ax25_fillin_cb(ax25, ax25->ax25_dev);
+ dev_put(dev);
break;
default:
^ permalink raw reply related
* Re: [bisected] Wireless regression in 2.6.32-git
From: John W. Linville @ 2009-09-28 13:59 UTC (permalink / raw)
To: Johannes Berg
Cc: Arjan van de Ven, Hugh Dickins, netdev, linux-kernel,
linux-wireless
In-Reply-To: <1254077199.6583.8.camel@johannes.local>
On Sun, Sep 27, 2009 at 08:46:39PM +0200, Johannes Berg wrote:
> On Sun, 2009-09-27 at 20:45 +0200, Arjan van de Ven wrote:
>
> > > Subject: cfg80211: don't set privacy w/o key
> > >
> > > When wpa_supplicant is used to connect to open networks,
> > > it causes the wdev->wext.keys to point to key memory, but
> > > that key memory is all empty. Only use privacy when there
> > > is a default key to be used.
> >
> >
> > indeed it does
> >
> > can we get this into mainline soon ?
>
> John's on his way home I suppose.
Yes, I'll get to it today -- sorry for the delays related to my travel!
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH 13/13] TProxy: use the interface primary IP address as a default value for --on-ip
From: Brian Haley @ 2009-09-28 16:16 UTC (permalink / raw)
To: Balazs Scheidler; +Cc: netfilter-devel, netdev
In-Reply-To: <1253902068.10105.1.camel@bzorp.balabit>
Balazs Scheidler wrote:
> One question, how fast is ipv6_dev_get_saddr()? Since the TPROXY target
> can execute on a per-packet path (although the socket match should take
> care of packets that belong to already-established connections), this
> may be performance critical. Is ipv6_dev_get_saddr() something that I
> can call so often?
It probably isn't the best thing to be calling on a per-packet basis, it's
mainly called now on a per-connection basis. I guess if it's really bad
for you we could do something like ipv6_get_lladdr() does for finding
a link-local address, it might be good enough in this case.
-Brian
^ permalink raw reply
* [PATCH] isdn: fix netjet/isdnhdlc build errors
From: Randy Dunlap @ 2009-09-28 16:25 UTC (permalink / raw)
To: Linus Torvalds, davem; +Cc: Linux Kernel Mailing List, Karsten Keil, netdev
In-Reply-To: <alpine.LFD.2.01.0909271511190.3349@localhost.localdomain>
From: Randy Dunlap <randy.dunlap@oracle.com>
Commit cb3824bade2549d7ad059d5802da43312540fdee didn't fix this problem.
Fix build errors in netjet, using isdnhdlc module:
drivers/built-in.o: In function `mode_tiger':
netjet.c:(.text+0x1ca0c7): undefined reference to `isdnhdlc_rcv_init'
netjet.c:(.text+0x1ca0d4): undefined reference to `isdnhdlc_out_init'
drivers/built-in.o: In function `fill_dma':
netjet.c:(.text+0x1ca2bd): undefined reference to `isdnhdlc_encode'
drivers/built-in.o: In function `read_dma':
netjet.c:(.text+0x1ca614): undefined reference to `isdnhdlc_decode'
drivers/built-in.o: In function `nj_irq':
netjet.c:(.text+0x1cb07a): undefined reference to `isdnhdlc_encode'
drivers/built-in.o: In function `isdnhdlc_decode':
(.text+0x1c2088): undefined reference to `crc_ccitt_table'
drivers/built-in.o: In function `isdnhdlc_encode':
(.text+0x1c2339): undefined reference to `crc_ccitt_table'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Karsten Keil <keil@b1-systems.de>
---
drivers/isdn/hardware/mISDN/Kconfig | 1 +
drivers/isdn/i4l/Kconfig | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
--- lnx-2632-rc1.orig/drivers/isdn/hardware/mISDN/Kconfig
+++ lnx-2632-rc1/drivers/isdn/hardware/mISDN/Kconfig
@@ -78,6 +78,7 @@ config MISDN_NETJET
depends on PCI
select MISDN_IPAC
select ISDN_HDLC
+ select ISDN_I4L
help
Enable support for Traverse Technologies NETJet PCI cards.
--- lnx-2632-rc1.orig/drivers/isdn/i4l/Kconfig
+++ lnx-2632-rc1/drivers/isdn/i4l/Kconfig
@@ -141,8 +141,7 @@ endmenu
endif
config ISDN_HDLC
- tristate
- depends on HISAX_ST5481
+ tristate
select CRC_CCITT
select BITREVERSE
^ permalink raw reply
* Fw: [Bug 14241] New: Promiscuous mode on network slows the network down
From: Stephen Hemminger @ 2009-09-28 16:52 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev
Begin forwarded message:
Date: Sat, 26 Sep 2009 23:34:40 GMT
From: bugzilla-daemon@bugzilla.kernel.org
To: shemminger@linux-foundation.org
Subject: [Bug 14241] New: Promiscuous mode on network slows the network down
http://bugzilla.kernel.org/show_bug.cgi?id=14241
Summary: Promiscuous mode on network slows the network down
Product: Networking
Version: 2.5
Kernel Version: 2.6.31
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: IPV4
AssignedTo: shemminger@linux-foundation.org
ReportedBy: mwahal@gmail.com
Regression: No
Hi,
I have been running 2.6.22.14 kernel for about 2+ years on a pentium D 925, 1GB
DDR2 system. I have a realtek 8169 gigabit onboard network controller on a
ubuntu distribution. I wanted to try kvm but it didn't run because the
kvm-intel module of 2.6.22 kernel is way too old. So, I upgraded to 2.6.28 (and
later to 2.6.31 to eliminate 2.6.28 issues) to try that kernel. The kvm did
work with 2.6.28. I had to put the ethernet in bridge mode so that the kvm
guest OS gets the same IP address from my subnet. As a side effect when putting
in bridge mode, the ethernet interface also enters promiscuous mode. I made
changes in /etc/network/interface file as per ubuntu kvm wiki page to add a
bridge interface and add the eth0 to the bridge port.
Anyway, I noticed that certain network related tasks were taking too long. I
stream video my server using UPnP to my UPnP client. The UPnP client had
trouble streaming over a gigabit network inside my home. I was watching a x264
720p movie yesterday and it was freezing on almost each frame. This is all with
2.6.28 (and later upgraded to 2.6.31 latest kernel). If I downgrade back to
2.6.22 kernel, I dont have any issues streaming even a 20Mbps movie.
I've a 6Mbps DSL line at home. I run some scripts during the day to get stocks
quotes from yahoo. That involves about issues 100 or so wget requests. On a
2.6.22 kernel, that takes about 2-3 mins to complete. On a 2.6.31 kernel it
takes about 45-50 mins.
Since I didnt change the /etc/network/interfaces file , so when 2.6.22 loads,
the ethernet still enters into promiscuous mode. I can run iftop and see that
its watching other traffic on my network.
So, my conclusion is that there is something drastically change in the ethernet
driver when it runs in promiscuous mode between 2.6.22 and 2.6.28 (or 31) which
is making it run excruciatingly slow. I'm open to all suggestions for making
any changes to my system. I'm willing to offer whatever information is needed
from my system if someone is willing to take a look at it. I do need kvm but
not the expense of a sloooow network.
Thanks for reading so far.
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
--
^ permalink raw reply
* Re: [PATCH] ax25: Add missing dev_put in ax25_setsockopt
From: Bernard Pidoux @ 2009-09-28 17:46 UTC (permalink / raw)
To: Ralf Baechle
Cc: Jarek Poplawski, David Miller, Bernard Pidoux F6BVP,
Linux Netdev List, linux-hams
In-Reply-To: <20090928125313.GA14250@linux-mips.org>
Hi take this one too. Hi.
Applied.
Thanks Ralf.
Bernard
Ralf Baechle a écrit :
> ax25_setsockopt SO_BINDTODEVICE is missing a dev_put call in case of
> success. Re-order code to fix this bug. While at it also reformat two
> lines of code to comply with the Linux coding style.
>
> Initial patch by Jarek Poplawski <jarkao2@gmail.com>.
>
> Reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>
> ---
> Counter-proposal. Reordering all the code avoids the need for a 2nd dev_put
> and is more readable.
>
> Ralf
>
> net/ax25/af_ax25.c | 19 ++++++++++---------
> 1 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
> index fbcac76..4102de1 100644
> --- a/net/ax25/af_ax25.c
> +++ b/net/ax25/af_ax25.c
> @@ -641,15 +641,10 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
>
> case SO_BINDTODEVICE:
> if (optlen > IFNAMSIZ)
> - optlen=IFNAMSIZ;
> - if (copy_from_user(devname, optval, optlen)) {
> - res = -EFAULT;
> - break;
> - }
> + optlen = IFNAMSIZ;
>
> - dev = dev_get_by_name(&init_net, devname);
> - if (dev == NULL) {
> - res = -ENODEV;
> + if (copy_from_user(devname, optval, optlen)) {
> + res = -EFAULT;
> break;
> }
>
> @@ -657,12 +652,18 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname,
> (sock->state != SS_UNCONNECTED ||
> sk->sk_state == TCP_LISTEN)) {
> res = -EADDRNOTAVAIL;
> - dev_put(dev);
> + break;
> + }
> +
> + dev = dev_get_by_name(&init_net, devname);
> + if (!dev) {
> + res = -ENODEV;
> break;
> }
>
> ax25->ax25_dev = ax25_dev_ax25dev(dev);
> ax25_fillin_cb(ax25, ax25->ax25_dev);
> + dev_put(dev);
> break;
>
> default:
>
^ permalink raw reply
* Re: [2.6.31-git17] WARNING: at kernel/hrtimer.c:648 hres_timers_resume+0x40/0x50()/WARNING: at drivers/base/sys.c:353 __sysdev_resume+0xc3/0xe0()
From: Maciej Rutecki @ 2009-09-28 18:38 UTC (permalink / raw)
To: Yong Zhang
Cc: Linux Kernel Mailing List, Rafael J. Wysocki, clemens,
venkatesh.pallipadi, gregkh, zambrano, davem, netdev
In-Reply-To: <2674af740909271854v191d9768mc3d96f30998f8c01@mail.gmail.com>
2009/9/28 Yong Zhang <yong.zhang0@gmail.com>:
>>
>
> If you could, then please do it. It can give us some helpful information.
Add patch and remove previous:
http://unixy.pl/maciek/download/kernel/2.6.31-git17/gumis/dmesg-debug.txt
s2disk&resume twice.
no "timekeeping_resume() called with IRQs enabled!".
I found some interesting thing, warnings appear only once, during
first s2disk, on second don't appear.
Regards
--
Maciej Rutecki
http://www.maciek.unixy.pl
^ permalink raw reply
* [PATCH] get rid of read/write lock in gen_estimator
From: Stephen Hemminger @ 2009-09-28 18:38 UTC (permalink / raw)
To: David Miller, netdev
Don't need a read/write lock here sinc there already is a spin lock that
is being acquired.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/core/gen_estimator.c 2009-09-24 16:27:01.239755070 -0700
+++ b/net/core/gen_estimator.c 2009-09-24 16:41:09.290751273 -0700
@@ -101,9 +101,6 @@ struct gen_estimator_head
static struct gen_estimator_head elist[EST_MAX_INTERVAL+1];
-/* Protects against NULL dereference */
-static DEFINE_RWLOCK(est_lock);
-
/* Protects against soft lockup during large deletion */
static struct rb_root est_root = RB_ROOT;
@@ -118,9 +115,8 @@ static void est_timer(unsigned long arg)
u64 brate;
u32 npackets;
u32 rate;
-
+
spin_lock(e->stats_lock);
- read_lock(&est_lock);
if (e->bstats == NULL)
goto skip;
@@ -136,7 +132,6 @@ static void est_timer(unsigned long arg)
e->avpps += (rate >> e->ewma_log) - (e->avpps >> e->ewma_log);
e->rate_est->pps = (e->avpps+0x1FF)>>10;
skip:
- read_unlock(&est_lock);
spin_unlock(e->stats_lock);
}
@@ -270,9 +265,9 @@ void gen_kill_estimator(struct gnet_stat
while ((e = gen_find_node(bstats, rate_est))) {
rb_erase(&e->node, &est_root);
- write_lock_bh(&est_lock);
+ spin_lock(e->stats_lock);
e->bstats = NULL;
- write_unlock_bh(&est_lock);
+ spin_unlock(e->stats_lock);
list_del_rcu(&e->list);
call_rcu(&e->e_rcu, __gen_kill_estimator);
^ permalink raw reply
* Re: b43 is broken in latest net-2.6 and linux-2.6
From: John W. Linville @ 2009-09-28 18:42 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: Michael Buesch, Linux Netdev List
In-Reply-To: <4AB4BF1F.7070501@hartkopp.net>
On Sat, Sep 19, 2009 at 01:23:11PM +0200, Oliver Hartkopp wrote:
> Hello Michael,
>
> my b43 wireless card (Dell 830) is not working with the latest net-2.6 (and
> also linux-2.6 2.6.31-05767-gdf58bee).
>
> net-2.6 2.6.31-03263-gc29854e is working
> net-2.6 2.6.31-03301-ga97e178 is broken
>
> I removed the patch with the work_queue stuff which did not help - so it's
> probably the other patch you added to b43 recently.
>
> Don't know ... the wlan0 link does not become ready anymore.
>
> If you need some more information - please let me know.
Is this working better now, with 2.6.31-rc1?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH] get rid of read/write lock in gen_estimator
From: Eric Dumazet @ 2009-09-28 18:50 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
In-Reply-To: <20090928113855.52eab44b@nehalam>
Stephen Hemminger a écrit :
> Don't need a read/write lock here sinc there already is a spin lock that
> is being acquired.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> --- a/net/core/gen_estimator.c 2009-09-24 16:27:01.239755070 -0700
> +++ b/net/core/gen_estimator.c 2009-09-24 16:41:09.290751273 -0700
> @@ -101,9 +101,6 @@ struct gen_estimator_head
>
> static struct gen_estimator_head elist[EST_MAX_INTERVAL+1];
>
> -/* Protects against NULL dereference */
> -static DEFINE_RWLOCK(est_lock);
> -
> /* Protects against soft lockup during large deletion */
> static struct rb_root est_root = RB_ROOT;
>
> @@ -118,9 +115,8 @@ static void est_timer(unsigned long arg)
> u64 brate;
> u32 npackets;
> u32 rate;
> -
> +
> spin_lock(e->stats_lock);
> - read_lock(&est_lock);
> if (e->bstats == NULL)
> goto skip;
>
> @@ -136,7 +132,6 @@ static void est_timer(unsigned long arg)
> e->avpps += (rate >> e->ewma_log) - (e->avpps >> e->ewma_log);
> e->rate_est->pps = (e->avpps+0x1FF)>>10;
> skip:
> - read_unlock(&est_lock);
> spin_unlock(e->stats_lock);
> }
>
> @@ -270,9 +265,9 @@ void gen_kill_estimator(struct gnet_stat
> while ((e = gen_find_node(bstats, rate_est))) {
> rb_erase(&e->node, &est_root);
>
> - write_lock_bh(&est_lock);
> + spin_lock(e->stats_lock);
Are you sure _bh() variant is not needed here ?
> e->bstats = NULL;
> - write_unlock_bh(&est_lock);
> + spin_unlock(e->stats_lock);
>
> list_del_rcu(&e->list);
> call_rcu(&e->e_rcu, __gen_kill_estimator);
^ permalink raw reply
* Re: [PATCH] ax25: Add missing dev_put in ax25_setsockopt
From: David Miller @ 2009-09-28 19:26 UTC (permalink / raw)
To: ralf; +Cc: jarkao2, f6bvp, bernard.pidoux, netdev, linux-hams
In-Reply-To: <20090928125313.GA14250@linux-mips.org>
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 28 Sep 2009 13:53:13 +0100
> ax25_setsockopt SO_BINDTODEVICE is missing a dev_put call in case of
> success. Re-order code to fix this bug. While at it also reformat two
> lines of code to comply with the Linux coding style.
>
> Initial patch by Jarek Poplawski <jarkao2@gmail.com>.
>
> Reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>
> ---
> Counter-proposal. Reordering all the code avoids the need for a 2nd dev_put
> and is more readable.
Looks good to me, applied.
^ permalink raw reply
* Re: [PATCH] get rid of read/write lock in gen_estimator
From: David Miller @ 2009-09-28 19:42 UTC (permalink / raw)
To: eric.dumazet; +Cc: shemminger, netdev
In-Reply-To: <4AC10574.6070406@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 28 Sep 2009 20:50:28 +0200
> Stephen Hemminger a écrit :
>> Don't need a read/write lock here sinc there already is a spin lock that
>> is being acquired.
>>
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
...
>> @@ -270,9 +265,9 @@ void gen_kill_estimator(struct gnet_stat
>> while ((e = gen_find_node(bstats, rate_est))) {
>> rb_erase(&e->node, &est_root);
>>
>> - write_lock_bh(&est_lock);
>> + spin_lock(e->stats_lock);
>
> Are you sure _bh() variant is not needed here ?
Right, that need to be fixed to be spin_lock_bh() and spin_unlock_bh()
in the next hunk.
^ permalink raw reply
* Re: [PATCH] atm: dereference of he_dev->rbps_virt in he_init_group()
From: David Miller @ 2009-09-28 19:46 UTC (permalink / raw)
To: roel.kluin; +Cc: joe, chas, linux-atm-general, netdev, akpm
In-Reply-To: <4AC07AC3.1090707@gmail.com>
From: Roel Kluin <roel.kluin@gmail.com>
Date: Mon, 28 Sep 2009 10:58:43 +0200
> From: Juha Leppanen <juha_motorsportcom@luukku.com>
> Date: Sat, Sep 26, 2009 at 12:34 AM
> Subject: atm: he: memleak/negative indexing of arrays in he_init_group()
>
> The prefix decrement causes a very long loop if pci_pool_alloc() failed
> in the first iteration. Also I swapped rbps and rbpl arguments.
>
> Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Applied, thanks.
Note that, by putting that From: line with Juha's info in it,
I assume that you want this person to be listed as the author
of the patch instead of you.
^ permalink raw reply
* Re: [PATCH] isdn: fix netjet/isdnhdlc build errors
From: David Miller @ 2009-09-28 19:47 UTC (permalink / raw)
To: randy.dunlap; +Cc: torvalds, linux-kernel, keil, netdev
In-Reply-To: <20090928092520.b6f921de.randy.dunlap@oracle.com>
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Mon, 28 Sep 2009 09:25:20 -0700
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Commit cb3824bade2549d7ad059d5802da43312540fdee didn't fix this problem.
>
> Fix build errors in netjet, using isdnhdlc module:
...
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Since Karsten has been unresonspive to ISDN stuff for weeks,
I'm going to apply this directly.
Thanks!
^ permalink raw reply
* Re: [PATCH 9/9] Add explicit bound checks in net/socket.c
From: David Miller @ 2009-09-28 19:57 UTC (permalink / raw)
To: arjan; +Cc: gorcunov, linux-kernel, torvalds, mingo, netdev
In-Reply-To: <20090926212302.0ce64a5c@infradead.org>
From: Arjan van de Ven <arjan@infradead.org>
Date: Sat, 26 Sep 2009 21:23:02 +0200
> The sys_socketcall() function has a very clever system for the copy
> size of its arguments. Unfortunately, gcc cannot deal with this in
> terms of proving that the copy_from_user() is then always in bounds.
> This is the last (well 9th of this series, but last in the kernel) such
> case around.
>
> With this patch, we can turn on code to make having the boundary provably
> right for the whole kernel, and detect introduction of new security
> accidents of this type early on.
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Applied, thanks.
^ permalink raw reply
* Re: [2.6.31-git17] WARNING: at kernel/hrtimer.c:648 hres_timers_resume+0x40/0x50()/WARNING: at drivers/base/sys.c:353 __sysdev_resume+0xc3/0xe0()
From: Maciej Rutecki @ 2009-09-28 20:08 UTC (permalink / raw)
To: Yong Zhang
Cc: Linux Kernel Mailing List, Rafael J. Wysocki, clemens,
venkatesh.pallipadi, gregkh, zambrano, davem, netdev
In-Reply-To: <8db1092f0909281138t18a379d1qdf999b0610ed6414@mail.gmail.com>
2009/9/28 Maciej Rutecki <maciej.rutecki@gmail.com>:
>
> Add patch and remove previous:
> http://unixy.pl/maciek/download/kernel/2.6.31-git17/gumis/dmesg-debug.txt
>
> s2disk&resume twice.
>
> no "timekeeping_resume() called with IRQs enabled!".
>
> I found some interesting thing, warnings appear only once, during
> first s2disk, on second don't appear.
Already I test 2.6-32-rc1 few times; warnings has gone. Any patches
has been add since 2.6.31-git17?
Regards
--
Maciej Rutecki
http://www.maciek.unixy.pl
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox