Netdev List
 help / color / mirror / Atom feed
* 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

* 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 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 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] 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

* [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

* [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

* 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

* Re: [ath5k-devel] Fw: Cannot register at bugzilla (bugreport added) [ ath5k bugreport ]
From: Holger Schurig @ 2009-09-28  7:42 UTC (permalink / raw)
  To: ath5k-devel-xDcbHBWguxEUs3QNXV6qNA
  Cc: Florian Mickler, Hans-J. Ullrich, Jiri Slaby,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA, John W. Linville,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20090925191524.7b2b228c@schatten>

> There are already other reports of this problem in discussion 
forums.
> It seems, the old madwifi-driver works better with dhcp - so 
people say.

I cannot second that. For me, ath5k works perfectly with DHCP,
with WEXT ("iwconfig") and NL80211 ("iw") and with
wpa_supplicant.

DHCP was NEVER an issue.

-- 
http://www.holgerschurig.de
--
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 2/2] cfg80211: fix wireless handlers assignment
From: Johannes Berg @ 2009-09-28  7:41 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: netdev, linux-wireless
In-Reply-To: <Pine.LNX.4.64.0909272139280.4061-T/S/X05ZC3jbmfIwyoSfiQ@public.gmane.org>

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

On Sun, 2009-09-27 at 21:58 +0100, Hugh Dickins wrote:

> This 2/2 patch does indeed work: many thanks.  But...

... it won't fix anything by itself.

> > This should fix the regression Hugh reported (of course requires the
> > other patch which unfortunately I forgot to CC you, Hugh, I'll send you
> > a copy in private).
> 
> ... the 1/2 patch has a couple of problems.
> 
> The trivial problem is that include/linux/notifier.h in Linus's git has
> #define NETDEV_PRE_UP		0x000D
> #define NETDEV_BONDING_OLDTYPE  0x000E
> #define NETDEV_BONDING_NEWTYPE  0x000F
> 
> So it rejects the patch you posted: I changed it to add
> #define NETDEV_PRE_INIT		0x0010
> just after the NETDEV_BONDING_NEWTYPE line.

Right, that's fixable, I was evidently working against the wrong tree.

> The more serious problem is that it stops both my machines from booting,
> too early for framebuffer to show any messages, but vga=normal shows a
> long stacktrace scrolling offscreen, with some notifier stuff in there.

Ahrg. That's strange.

> 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.

Interesting. Thanks for that; must be some notifier that doesn't expect
to be run. For all I care, it can be right before the kobject stuff, so
maybe that makes more sense as it's a fairly last-minute fix now. Of
course then it should be POST_INIT or PRE_REGISTER I suppose.

johannes

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

^ permalink raw reply

* [PATCH] ax25: Add missing dev_put in ax25_setsockopt
From: Jarek Poplawski @ 2009-09-28  7:12 UTC (permalink / raw)
  To: David Miller
  Cc: Bernard Pidoux F6BVP, Bernard Pidoux, Ralf Baechle DL5RB,
	Linux Netdev List, linux-hams
In-Reply-To: <4ABA9058.3010605@free.fr>

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:

^ permalink raw reply related

* 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: Yong Zhang @ 2009-09-28  1:54 UTC (permalink / raw)
  To: Maciej Rutecki
  Cc: Linux Kernel Mailing List, Rafael J. Wysocki, clemens,
	venkatesh.pallipadi, gregkh, zambrano, davem, netdev
In-Reply-To: <8db1092f0909270916k79d0c369ub93b5e8ddf66c979@mail.gmail.com>

On Mon, Sep 28, 2009 at 12:16 AM, Maciej Rutecki
<maciej.rutecki@gmail.com> wrote:
> 2009/9/27 Yong Zhang <yong.zhang0@gmail.com>:
>>
>> It seem this is cause by b44 dirver. Can you give a try?
>>
>> From 05ee2f22a7ea065e05bf8b5294d222a3700d2cc8 Mon Sep 17 00:00:00 2001
>> From: Yong Zhang <yong.zhang0@gmail.com>
>> Date: Sun, 27 Sep 2009 22:42:41 +0800
>> Subject: [PATCH] net/b44: keep irq state at suspend_resume
>>
>> suspend() and resume() assume irq is disabled. So keep the irq
>> state when do this.
>
> Remove previous patch, add it to clean 2.6.31-git17. It doesn't help.
>
>> --
>> 1.6.0.4
>>
>>> So can you test the follow patch. And show the dmesg info(DEBUG
>>> level) after WARNING is triggered?
>>>
>>> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
>>> index fb0f46f..4a00a1a 100644
>
> Still test it?
>

If you could, then please do it. It can give us some helpful information.

Thanks,
Yong

> Regards
> --
> Maciej Rutecki
> http://www.maciek.unixy.pl
>

^ permalink raw reply

* Re: [PATCH 2/2] cfg80211: fix wireless handlers assignment
From: Hugh Dickins @ 2009-09-27 21:50 UTC (permalink / raw)
  To: Johannes Berg; +Cc: netdev, linux-wireless
In-Reply-To: <Pine.LNX.4.64.0909272139280.4061-T/S/X05ZC3jbmfIwyoSfiQ@public.gmane.org>

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.

Hugh
--
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 2/2] cfg80211: fix wireless handlers assignment
From: Hugh Dickins @ 2009-09-27 20:58 UTC (permalink / raw)
  To: Johannes Berg; +Cc: netdev, linux-wireless
In-Reply-To: <1254076075.6583.6.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>

On Sun, 27 Sep 2009, 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.
> 
> Signed-off-by: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>

This 2/2 patch does indeed work: many thanks.  But...

> ---
> This should fix the regression Hugh reported (of course requires the
> other patch which unfortunately I forgot to CC you, Hugh, I'll send you
> a copy in private).

... the 1/2 patch has a couple of problems.

The trivial problem is that include/linux/notifier.h in Linus's git has
#define NETDEV_PRE_UP		0x000D
#define NETDEV_BONDING_OLDTYPE  0x000E
#define NETDEV_BONDING_NEWTYPE  0x000F

So it rejects the patch you posted: I changed it to add
#define NETDEV_PRE_INIT		0x0010
just after the NETDEV_BONDING_NEWTYPE line.

The more serious problem is that it stops both my machines from booting,
too early for framebuffer to show any messages, but vga=normal shows a
long stacktrace scrolling offscreen, with some notifier stuff in there.

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.

Hugh

* I wrote that hoping the Aspire One build would complete soon,
but it's still going: assume it's fine unless I say otherwise.
--
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

* [PATCH] ax25: Fix possible oops in ax25_make_new
From: Jarek Poplawski @ 2009-09-27 20:57 UTC (permalink / raw)
  To: Ralf Baechle DL5RB
  Cc: David Miller, Bernard Pidoux F6BVP, Bernard Pidoux,
	Linux Netdev List, linux-hams
In-Reply-To: <20090925134052.GA1661@linux-mips.org>

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;

^ permalink raw reply related

* Re: [PATCH 1/3] lib/vsprintf.c: Add %pU - ptr to a UUID/GUID
From: Greg KH @ 2009-09-27 20:53 UTC (permalink / raw)
  To: Joe Perches; +Cc: Ingo Oeser, linux-kernel, netdev
In-Reply-To: <1254078046.28232.183.camel@Joe-Laptop.home>

On Sun, Sep 27, 2009 at 12:00:46PM -0700, Joe Perches wrote:
> On Sun, 2009-09-27 at 12:45 +0200, Ingo Oeser wrote:
> > Hi Joe,
> 
> Hello Ingo.
> 
> > On Sunday 27 September 2009, Joe Perches wrote:
> > > UUID/GUIDs are somewhat common in kernel source.
> > > Standardize the printed style of UUID/GUIDs by using
> > > another extension to %p.
> > > %pU:    01020304:0506:0708:090a:0b0c0d0e0f10
> > > %pUr:   04030201:0605:0807:0a09:0b0c0d0e0f10
> > Code does "01020304-0506-0708-090a-0b0c0d0e0f10".
> > This is not, what commit promises. Please change the commit message!
> 
> True enough, that can change, no worries.
> 
> Does anyone have comments like:
> 
> 1 what a stupid idea
> 2 how unnecessary
> 3 meh
> 4 bloat alert! linux is supposed to be lean
> 5 ok idea, bad implementation
> 6 sure, why not

Sure, why not :)

^ permalink raw reply

* Re: [PATCH 2/2] cfg80211: fix wireless handlers assignment
From: Luis R. Rodriguez @ 2009-09-27 20:30 UTC (permalink / raw)
  To: Johannes Berg; +Cc: netdev, linux-wireless, Hugh Dickins
In-Reply-To: <1254076075.6583.6.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>

On Sun, Sep 27, 2009 at 11:27 AM, Johannes Berg
<johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> 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.
>
> Signed-off-by: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
> ---
> This should fix the regression Hugh reported (of course requires the
> other patch which unfortunately I forgot to CC you, Hugh, I'll send you
> a copy in private).

Are these stable fixes?

  Luis
--
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 1/2] net: introduce NETDEV_PRE_INIT notifier
From: Marcel Holtmann @ 2009-09-27 20:11 UTC (permalink / raw)
  To: Johannes Berg; +Cc: netdev, linux-wireless
In-Reply-To: <1254075999.6583.4.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>

Hi Johannes,

> For various purposes including a wireless extensions
> bugfix, we need to hook into the netdev creation at
> a point before netdev_register_kobject(). It seems
> more generic, however, to have it even earlier. This
> will also ease doing the dev type assignment that
> Marcel was working on generically.

you are beating me to it. I can only second that this is a good idea for
the dev type assignment. Once Dave acks this I can sent a rebased patch
for the dev type stuff for WiFi.

Regards

Marcel


--
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] ax25: Fix ax25_cb refcounting in ax25_ctl_ioctl
From: Jarek Poplawski @ 2009-09-27 19:02 UTC (permalink / raw)
  To: Ralf Baechle DL5RB
  Cc: David Miller, Bernard Pidoux F6BVP, Bernard Pidoux,
	Linux Netdev List, linux-hams
In-Reply-To: <20090927171029.GA3297@del.dom.local>

On Sun, Sep 27, 2009 at 07:10:29PM +0200, Jarek Poplawski wrote:
...
> In this case valid calls (return 0) were affected too, so I guess the
> whole thing is rarely used.

And, after all, there would be only a little, invisible memory leak.

Jarek P.

^ permalink raw reply

* Re: [PATCH 1/3] lib/vsprintf.c: Add %pU - ptr to a UUID/GUID
From: Joe Perches @ 2009-09-27 19:00 UTC (permalink / raw)
  To: Ingo Oeser; +Cc: linux-kernel, netdev, Greg KH
In-Reply-To: <200909271245.34000.ioe-lkml@rameria.de>

On Sun, 2009-09-27 at 12:45 +0200, Ingo Oeser wrote:
> Hi Joe,

Hello Ingo.

> On Sunday 27 September 2009, Joe Perches wrote:
> > UUID/GUIDs are somewhat common in kernel source.
> > Standardize the printed style of UUID/GUIDs by using
> > another extension to %p.
> > %pU:    01020304:0506:0708:090a:0b0c0d0e0f10
> > %pUr:   04030201:0605:0807:0a09:0b0c0d0e0f10
> Code does "01020304-0506-0708-090a-0b0c0d0e0f10".
> This is not, what commit promises. Please change the commit message!

True enough, that can change, no worries.

Does anyone have comments like:

1 what a stupid idea
2 how unnecessary
3 meh
4 bloat alert! linux is supposed to be lean
5 ok idea, bad implementation
6 sure, why not

^ permalink raw reply

* Re: [bisected] Wireless regression in 2.6.32-git
From: Johannes Berg @ 2009-09-27 18:46 UTC (permalink / raw)
  To: Arjan van de Ven
  Cc: Hugh Dickins, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20090927204548.3ee3768f-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>

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

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.

johannes


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

^ permalink raw reply

* Re: [bisected] Wireless regression in 2.6.32-git
From: Arjan van de Ven @ 2009-09-27 18:45 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Johannes Berg, netdev, linux-kernel, linux-wireless
In-Reply-To: <Pine.LNX.4.64.0909271708210.8927@sister.anvils>

On Sun, 27 Sep 2009 17:14:04 +0100 (BST)
Hugh Dickins <hugh.dickins@tiscali.co.uk> wrote:

> On Sun, 27 Sep 2009, Arjan van de Ven wrote:
> > 
> > With todays git my laptop fails to associate with my access point.
> > Bisection points to the commit below, and reverting this one commit
> > on the HEAD of tree also fixes the issue, so I'm pretty confident
> > that this commit is to blame.
> > 
> > I have a 4965 wifi card in my laptop, and the network I'm trying to
> > connect to has no encryption. I'm running Fedora 11 as OS.
> > 
> > I would like to kindly request for this commit to be reverted until
> > a more permanent solution is found (I'm happy to test any patches)..
> > 
> > 94f85853324e02c3a32bc3101f090dc9a3f512b4 is first bad commit
> > commit 94f85853324e02c3a32bc3101f090dc9a3f512b4
> > Author: Johannes Berg <johannes@sipsolutions.net>
> > Date:   Thu Sep 17 17:15:31 2009 -0700
> > 
> >     cfg80211: don't overwrite privacy setting
> >     
> >     When cfg80211 is instructed to connect, it always
> >     uses the default WEP key for the privacy setting,
> >     which clearly is wrong when using wpa_supplicant.
> >     Don't overwrite the setting, and rely on it being
> >     false when wpa_supplicant is not running, instead
> >     set it to true when we have keys.
> >     
> >     Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> >     Signed-off-by: John W. Linville <linville@tuxdriver.com>
> > 
> > :040000 040000 27fb46273e88eefee373699eb7e3f2923ac0886b
> > 9518ee3e52c8320613cc5eee5ac54aabf082432f M	net
> 
> I've a different problem with wireless that Johannes is investigating
> for me on linux-wireless; but here's a patch that he pointed me to
> along the way, didn't help my issue but I expect it will help yours...
> 
> 
> 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 ?

^ permalink raw reply

* [PATCH 2/2] cfg80211: fix wireless handlers assignment
From: Johannes Berg @ 2009-09-27 18:27 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless, Hugh Dickins

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@sipsolutions.net>
---
This should fix the regression Hugh reported (of course requires the
other patch which unfortunately I forgot to CC you, Hugh, I'll send you
a copy in private).

 net/wireless/core.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- wireless-testing.orig/net/wireless/core.c	2009-09-27 15:12:20.000000000 +0200
+++ wireless-testing/net/wireless/core.c	2009-09-27 15:12:54.000000000 +0200
@@ -641,6 +641,12 @@ static int cfg80211_netdev_notifier_call
 	WARN_ON(wdev->iftype == NL80211_IFTYPE_UNSPECIFIED);
 
 	switch (state) {
+	case NETDEV_PRE_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;



^ permalink raw reply

* [PATCH 1/2] net: introduce NETDEV_PRE_INIT notifier
From: Johannes Berg @ 2009-09-27 18:26 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless

For various purposes including a wireless extensions
bugfix, we need to hook into the netdev creation at
a point before netdev_register_kobject(). It seems
more generic, however, to have it even earlier. This
will also ease doing the dev type assignment that
Marcel was working on generically.

Signed-off-by: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
---
 include/linux/notifier.h |    1 +
 net/core/dev.c           |    5 +++++
 2 files changed, 6 insertions(+)

--- wireless-testing.orig/include/linux/notifier.h	2009-09-27 15:09:10.000000000 +0200
+++ wireless-testing/include/linux/notifier.h	2009-09-27 15:10:19.000000000 +0200
@@ -199,6 +199,7 @@ static inline int notifier_to_errno(int 
 #define NETDEV_FEAT_CHANGE	0x000B
 #define NETDEV_BONDING_FAILOVER 0x000C
 #define NETDEV_PRE_UP		0x000D
+#define NETDEV_PRE_INIT		0x000E
 
 #define SYS_DOWN	0x0001	/* Notify of system down */
 #define SYS_RESTART	SYS_DOWN
--- wireless-testing.orig/net/core/dev.c	2009-09-27 15:09:56.000000000 +0200
+++ wireless-testing/net/core/dev.c	2009-09-27 15:11:40.000000000 +0200
@@ -4734,6 +4734,11 @@ int register_netdevice(struct net_device
 
 	dev->iflink = -1;
 
+	ret = call_netdevice_notifiers(NETDEV_PRE_INIT, dev);
+	ret = notifier_to_errno(ret);
+	if (ret)
+		goto out;
+
 	/* Init, if this function is available */
 	if (dev->netdev_ops->ndo_init) {
 		ret = dev->netdev_ops->ndo_init(dev);


--
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: [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: Rafael J. Wysocki @ 2009-09-27 18:17 UTC (permalink / raw)
  To: Maciej Rutecki
  Cc: Yong Zhang, Linux Kernel Mailing List, clemens,
	venkatesh.pallipadi, gregkh, zambrano, davem, netdev
In-Reply-To: <8db1092f0909270916k79d0c369ub93b5e8ddf66c979@mail.gmail.com>

On Sunday 27 September 2009, Maciej Rutecki wrote:
> 2009/9/27 Yong Zhang <yong.zhang0@gmail.com>:
> >
> > It seem this is cause by b44 dirver. Can you give a try?
> >
> > From 05ee2f22a7ea065e05bf8b5294d222a3700d2cc8 Mon Sep 17 00:00:00 2001
> > From: Yong Zhang <yong.zhang0@gmail.com>
> > Date: Sun, 27 Sep 2009 22:42:41 +0800
> > Subject: [PATCH] net/b44: keep irq state at suspend_resume
> >
> > suspend() and resume() assume irq is disabled. So keep the irq
> > state when do this.
> 
> Remove previous patch, add it to clean 2.6.31-git17. It doesn't help.

It couldn't.  The problem is elswhere, but I haven't found it yet.

Thanks,
Rafael

^ 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