* [PATCH v2.6.27] mac80211: fix two issues in debugfs
@ 2008-10-10 15:52 Johannes Berg
2008-10-10 16:01 ` [stable] " Greg KH
2008-10-15 21:38 ` patch mac80211-fix-two-issues-in-debugfs.patch added to 2.6.27-stable tree gregkh
0 siblings, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2008-10-10 15:52 UTC (permalink / raw)
To: stable; +Cc: John Linville, linux-wireless
This fixes RHBZ 466264, whenever the master interface is
renamed this code would BUG_ON. Also fixes a separately
reported bug with the debugfs dir being NULL.
This patch is not applicable to the next kernel version
because both these issues have been fixed, the first one
by not having the master interface have a ieee80211_ptr
at all, and the second one by also leaving the function
early.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>
---
net/mac80211/debugfs_netdev.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- net-tx-2.6.orig/net/mac80211/debugfs_netdev.c 2008-10-10 17:46:50.000000000 +0200
+++ net-tx-2.6/net/mac80211/debugfs_netdev.c 2008-10-10 17:48:41.000000000 +0200
@@ -537,6 +537,7 @@ static int netdev_notify(struct notifier
{
struct net_device *dev = ndev;
struct dentry *dir;
+ struct ieee80211_local *local;
struct ieee80211_sub_if_data *sdata;
char buf[10+IFNAMSIZ];
@@ -549,10 +550,19 @@ static int netdev_notify(struct notifier
if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
return 0;
- sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ /*
+ * Do not use IEEE80211_DEV_TO_SUB_IF because that
+ * BUG_ONs for the master netdev which we need to
+ * handle here.
+ */
+ sdata = netdev_priv(dev);
- sprintf(buf, "netdev:%s", dev->name);
dir = sdata->debugfsdir;
+
+ if (!dir)
+ return 0;
+
+ sprintf(buf, "netdev:%s", dev->name);
if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
"dir to %s\n", buf);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable] [PATCH v2.6.27] mac80211: fix two issues in debugfs
2008-10-10 15:52 [PATCH v2.6.27] mac80211: fix two issues in debugfs Johannes Berg
@ 2008-10-10 16:01 ` Greg KH
2008-10-10 16:30 ` Johannes Berg
2008-10-15 21:38 ` patch mac80211-fix-two-issues-in-debugfs.patch added to 2.6.27-stable tree gregkh
1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2008-10-10 16:01 UTC (permalink / raw)
To: Johannes Berg; +Cc: stable, linux-wireless, John Linville
On Fri, Oct 10, 2008 at 05:52:49PM +0200, Johannes Berg wrote:
> This fixes RHBZ 466264, whenever the master interface is
> renamed this code would BUG_ON. Also fixes a separately
> reported bug with the debugfs dir being NULL.
>
> This patch is not applicable to the next kernel version
> because both these issues have been fixed, the first one
> by not having the master interface have a ieee80211_ptr
> at all, and the second one by also leaving the function
> early.
So this will not be going into .28, right? What -stable trees should it
go to, .27? .26? .25?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable] [PATCH v2.6.27] mac80211: fix two issues in debugfs
2008-10-10 16:01 ` [stable] " Greg KH
@ 2008-10-10 16:30 ` Johannes Berg
2008-10-10 16:50 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2008-10-10 16:30 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, John Linville
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]
On Fri, 2008-10-10 at 09:01 -0700, Greg KH wrote:
> On Fri, Oct 10, 2008 at 05:52:49PM +0200, Johannes Berg wrote:
> > This fixes RHBZ 466264, whenever the master interface is
> > renamed this code would BUG_ON. Also fixes a separately
> > reported bug with the debugfs dir being NULL.
> >
> > This patch is not applicable to the next kernel version
> > because both these issues have been fixed, the first one
> > by not having the master interface have a ieee80211_ptr
> > at all, and the second one by also leaving the function
> > early.
>
> So this will not be going into .28, right?
No, it won't, the code has changed in ways that won't make this happen
any more. The fix with the (!dir) part is on it's way, I could split
that out separately if you'd like, but then we'd have to fix up the
rejects because that patch looks different too even though the result
will be very similar.
> What -stable trees should it
> go to, .27? .26? .25?
Good question. The latter fix with (!dir) applies to .26 as well, but
the issue is hit so infrequently (only when adding the debugfs dir has
failed before) that I'm not sure it's worth it. And the master interface
issue isn't present before .27.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable] [PATCH v2.6.27] mac80211: fix two issues in debugfs
2008-10-10 16:30 ` Johannes Berg
@ 2008-10-10 16:50 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2008-10-10 16:50 UTC (permalink / raw)
To: Johannes Berg; +Cc: stable, linux-wireless, John Linville
On Fri, Oct 10, 2008 at 06:30:32PM +0200, Johannes Berg wrote:
> On Fri, 2008-10-10 at 09:01 -0700, Greg KH wrote:
> > On Fri, Oct 10, 2008 at 05:52:49PM +0200, Johannes Berg wrote:
> > > This fixes RHBZ 466264, whenever the master interface is
> > > renamed this code would BUG_ON. Also fixes a separately
> > > reported bug with the debugfs dir being NULL.
> > >
> > > This patch is not applicable to the next kernel version
> > > because both these issues have been fixed, the first one
> > > by not having the master interface have a ieee80211_ptr
> > > at all, and the second one by also leaving the function
> > > early.
> >
> > So this will not be going into .28, right?
>
> No, it won't, the code has changed in ways that won't make this happen
> any more. The fix with the (!dir) part is on it's way, I could split
> that out separately if you'd like, but then we'd have to fix up the
> rejects because that patch looks different too even though the result
> will be very similar.
That's ok, just want to have things clear if people are looking and
notice it's not in Linus's tree when it goes into -stable.
> > What -stable trees should it
> > go to, .27? .26? .25?
>
> Good question. The latter fix with (!dir) applies to .26 as well, but
> the issue is hit so infrequently (only when adding the debugfs dir has
> failed before) that I'm not sure it's worth it. And the master interface
> issue isn't present before .27.
Ok, so only for .27 is fine with me, I'll queue it up.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* patch mac80211-fix-two-issues-in-debugfs.patch added to 2.6.27-stable tree
2008-10-10 15:52 [PATCH v2.6.27] mac80211: fix two issues in debugfs Johannes Berg
2008-10-10 16:01 ` [stable] " Greg KH
@ 2008-10-15 21:38 ` gregkh
1 sibling, 0 replies; 5+ messages in thread
From: gregkh @ 2008-10-15 21:38 UTC (permalink / raw)
To: johannes, gregkh, linux-wireless, linville, stable; +Cc: stable, stable-commits
This is a note to let you know that we have just queued up the patch titled
Subject: mac80211: fix two issues in debugfs
to the 2.6.27-stable tree. Its filename is
mac80211-fix-two-issues-in-debugfs.patch
A git repo of this tree can be found at
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>From johannes@sipsolutions.net Wed Oct 15 14:25:41 2008
From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 10 Oct 2008 17:52:49 +0200
Subject: mac80211: fix two issues in debugfs
To: stable <stable@kernel.org>
Cc: linux-wireless <linux-wireless@vger.kernel.org>, John Linville <linville@tuxdriver.com>
Message-ID: <1223653970.3748.23.camel@johannes.berg>
From: Johannes Berg <johannes@sipsolutions.net>
Not in trees above 2.6.27 as it is fixed differently in .28.
This fixes RHBZ 466264, whenever the master interface is
renamed this code would BUG_ON. Also fixes a separately
reported bug with the debugfs dir being NULL.
This patch is not applicable to the next kernel version
because both these issues have been fixed, the first one
by not having the master interface have a ieee80211_ptr
at all, and the second one by also leaving the function
early.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/mac80211/debugfs_netdev.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -537,6 +537,7 @@ static int netdev_notify(struct notifier
{
struct net_device *dev = ndev;
struct dentry *dir;
+ struct ieee80211_local *local;
struct ieee80211_sub_if_data *sdata;
char buf[10+IFNAMSIZ];
@@ -549,10 +550,19 @@ static int netdev_notify(struct notifier
if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
return 0;
- sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ /*
+ * Do not use IEEE80211_DEV_TO_SUB_IF because that
+ * BUG_ONs for the master netdev which we need to
+ * handle here.
+ */
+ sdata = netdev_priv(dev);
- sprintf(buf, "netdev:%s", dev->name);
dir = sdata->debugfsdir;
+
+ if (!dir)
+ return 0;
+
+ sprintf(buf, "netdev:%s", dev->name);
if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
"dir to %s\n", buf);
Patches currently in stable-queue which might be from johannes@sipsolutions.net are
queue-2.6.27/mac80211-fix-two-issues-in-debugfs.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-15 21:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 15:52 [PATCH v2.6.27] mac80211: fix two issues in debugfs Johannes Berg
2008-10-10 16:01 ` [stable] " Greg KH
2008-10-10 16:30 ` Johannes Berg
2008-10-10 16:50 ` Greg KH
2008-10-15 21:38 ` patch mac80211-fix-two-issues-in-debugfs.patch added to 2.6.27-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).