All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andreas Mohr <andi@lisas.de>, Ingo Molnar <mingo@elte.hu>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Woodhouse <dwmw2@infradead.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>, Pavel Machek <pavel@ucw.cz>,
	kernel list <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	Pavel Emelyanov <xemul@openvz.org>,
	"Denis V. Lunev" <den@openvz.org>
Subject: Re: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage
Date: Sun, 30 Dec 2007 21:25:00 -0800	[thread overview]
Message-ID: <20071231052500.GB4187@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0712301526090.1963-100000@netrider.rowland.org>

On Sun, Dec 30, 2007 at 03:34:45PM -0500, Alan Stern wrote:
> On Sun, 30 Dec 2007, Ingo Molnar wrote:
> 
> > * Andreas Mohr <andi@lisas.de> wrote:
> > 
> > > (yes, that's all there is, despite CONFIG_USB_DEBUG being set)
> > > 
> > > The LED of a usb stick isn't active either, for obvious reasons.
> > > 
> > > And keep in mind that this is a (relatively old) OHCI-only machine... 
> > > (which had the 2.6.19 lsmod showing ohci-hcd just fine and working 
> > > fine with WLAN USB)
> > > 
> > > Now pondering whether to try -rc6 proper or whether to revert specific 
> > > guilty-looking USB changes... And wondering how to properly elevate 
> > > this issue (prompt Greg about it, new thread, bug #, ...?)
> 
> It looks like Greg misused the debugfs API -- which is ironic, because
> he wrote debugfs in the first place!  :-)

Oh crap, sorry, I did mess that up :(

> Let me know if this patch fixes the problem.  If it does, I'll submit 
> it to Greg with all the proper accoutrements.

This isn't going to work if CONFIG_DEBUGFS is not enabled either :(

> Index: 2.6.24-rc6-mm1/drivers/usb/host/ohci-hcd.c
> ===================================================================
> --- 2.6.24-rc6-mm1.orig/drivers/usb/host/ohci-hcd.c
> +++ 2.6.24-rc6-mm1/drivers/usb/host/ohci-hcd.c
> @@ -1067,14 +1067,8 @@ static int __init ohci_hcd_mod_init(void
>  
>  #ifdef DEBUG
>  	ohci_debug_root = debugfs_create_dir("ohci", NULL);
> -	if (!ohci_debug_root || IS_ERR(ohci_debug_root)) {
> -		if (!ohci_debug_root)
> -			retval = -ENOENT;
> -		else
> -			retval = PTR_ERR(ohci_debug_root);
> -
> -		goto error_debug;
> -	}
> +	if (!ohci_debug_root)
> +		return -ENOENT;

It needs to check for ERR_PTR(-ENODEV) which is the return value if
debugfs is not enabled, and if so, just ignore things.

If NULL is returned, or anything else, it's a real error.

So, try something like:
	if (!ohci_debug_root) {
		retval = -ENOENT;
		goto error_debug;
	}
	if (IS_ERR(ohci_debug_root) && PTR_ERR(ohci_debug_root) != -ENODEV) {
		retval = PTR_ERR(ohci_debug_root);
		goto error_debug;
	}

and let me know of that works for you.

Although the combination of CONFIG_USB_DEBUG and not CONFIG_DEBUGFS is
strange, we could just enable CONFIG_DEBUGFS is USB_DEBUG is enabled and
then simplify this logic a bunch at the same time.

thanks,

greg k-h

  reply	other threads:[~2007-12-31  5:24 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 19:10 2.6.24-rc3: find complains about /proc/net Pavel Machek
2007-11-19 22:04 ` Rafael J. Wysocki
2007-11-20 15:51   ` Pavel Emelyanov
2007-11-20 21:52     ` Eric W. Biederman
2007-11-20 21:59       ` Ingo Molnar
2007-11-20 22:17         ` Eric W. Biederman
2007-11-20 22:35           ` Ingo Molnar
2007-11-20 22:54             ` Roland McGrath
2007-11-20 23:01               ` Ingo Molnar
2007-11-20 23:06                 ` Guillaume Chazarain
2007-11-20 23:26                   ` Roland McGrath
2007-11-20 23:32                     ` Ulrich Drepper
2007-11-20 23:45                       ` Ingo Molnar
2007-11-20 23:51                         ` Roland McGrath
2007-11-21  0:47                           ` Eric W. Biederman
2007-11-21  1:01                           ` Rafael J. Wysocki
2007-11-21  0:41                       ` Eric W. Biederman
2007-11-20 23:43                   ` Ingo Molnar
2007-11-20 22:41         ` [PATCH] proc: Fix the threaded /proc/self Eric W. Biederman
2007-11-20 22:58           ` Guillaume Chazarain
2007-11-20 23:03           ` Ingo Molnar
2007-11-21  1:19     ` 2.6.24-rc3: find complains about /proc/net Eric W. Biederman
2007-11-21  6:36     ` Eric W. Biederman
2007-11-21  9:36       ` Pavel Emelyanov
2007-11-24 23:34     ` [CFT][PATCH] proc_net: Remove userspace visible changes Eric W. Biederman
2007-11-26  8:43       ` Eric W. Biederman
2007-11-26 22:17     ` [PATCH 2.6.24-rc3] Fix /proc/net breakage Eric W. Biederman
2007-11-27 11:20       ` Pavel Emelyanov
2007-11-27 12:36         ` Eric W. Biederman
2007-12-07  4:51       ` David Woodhouse
2007-12-07 10:23         ` Andrew Morton
2007-12-07 11:11           ` Denis V. Lunev
2007-12-27 17:40           ` Andreas Mohr
2007-12-27 18:41             ` Alexey Dobriyan
2007-12-27 22:17               ` Andreas Mohr
2007-12-28  6:22                 ` Alexey Dobriyan
2007-12-28  7:21                   ` Andreas Mohr
2007-12-30 16:14                     ` [usb regression] " Ingo Molnar
2007-12-30 20:34                       ` Alan Stern
2007-12-30 20:34                         ` Alan Stern
2007-12-31  5:25                         ` Greg KH [this message]
2007-12-31 17:49                           ` Alan Stern
2007-12-31 19:26                             ` Greg KH
2008-01-02  6:00                               ` Greg KH
2008-01-02  6:13                                 ` Andreas Mohr
2008-01-02  7:14                                   ` Greg KH
2008-01-02  7:14                                     ` Greg KH
2008-01-02 15:56                                 ` Alan Stern
2008-01-02 15:56                                   ` Alan Stern
2008-01-02 18:48                                   ` David Brownell
2008-01-02 18:48                                     ` David Brownell
2008-01-02  6:04                         ` Andreas Mohr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071231052500.GB4187@kroah.com \
    --to=greg@kroah.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@lisas.de \
    --cc=den@openvz.org \
    --cc=dwmw2@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=stern@rowland.harvard.edu \
    --cc=torvalds@linux-foundation.org \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.