linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix debugfs netdev rename
@ 2008-10-08  8:18 Johannes Berg
  2008-10-08  9:57 ` Robin Holt
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2008-10-08  8:18 UTC (permalink / raw)
  To: John Linville; +Cc: Robin Holt, linux-wireless

If, for some reason, a netdev has no debugfs dir, we shouldn't
try to rename that dir.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Robin Holt <holt@sgi.com>
---
Robin, ok, I was wrong, this might be causing it...

 net/mac80211/debugfs_netdev.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- everything.orig/net/mac80211/debugfs_netdev.c	2008-10-08 10:08:23.000000000 +0200
+++ everything/net/mac80211/debugfs_netdev.c	2008-10-08 10:08:37.000000000 +0200
@@ -481,8 +481,12 @@ static int netdev_notify(struct notifier
 
 	sdata = IEEE80211_DEV_TO_SUB_IF(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] 2+ messages in thread

* Re: [PATCH] mac80211: fix debugfs netdev rename
  2008-10-08  8:18 [PATCH] mac80211: fix debugfs netdev rename Johannes Berg
@ 2008-10-08  9:57 ` Robin Holt
  0 siblings, 0 replies; 2+ messages in thread
From: Robin Holt @ 2008-10-08  9:57 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, Robin Holt, linux-wireless

That looks like it is probably it!

Thanks,
Robin


On Wed, Oct 08, 2008 at 10:18:36AM +0200, Johannes Berg wrote:
> If, for some reason, a netdev has no debugfs dir, we shouldn't
> try to rename that dir.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Cc: Robin Holt <holt@sgi.com>
> ---
> Robin, ok, I was wrong, this might be causing it...
> 
>  net/mac80211/debugfs_netdev.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> --- everything.orig/net/mac80211/debugfs_netdev.c	2008-10-08 10:08:23.000000000 +0200
> +++ everything/net/mac80211/debugfs_netdev.c	2008-10-08 10:08:37.000000000 +0200
> @@ -481,8 +481,12 @@ static int netdev_notify(struct notifier
>  
>  	sdata = IEEE80211_DEV_TO_SUB_IF(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] 2+ messages in thread

end of thread, other threads:[~2008-10-08  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-08  8:18 [PATCH] mac80211: fix debugfs netdev rename Johannes Berg
2008-10-08  9:57 ` Robin Holt

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