public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Zick" <lkml@morethan.org>
To: Oliver Neukum <oliver@neukum.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: Null Pointer BUG in uhci_hcd
Date: Tue, 7 Jul 2009 09:32:44 -0500	[thread overview]
Message-ID: <200907070932.47441.lkml@morethan.org> (raw)
In-Reply-To: <200907071608.11050.oliver@neukum.org>

On Tue July 7 2009, Oliver Neukum wrote:
> Am Dienstag, 7. Juli 2009 11:13:01 schrieb Jiri Kosina:
> > [ adding linux-usb to CC ]
> >
> > On Sun, 5 Jul 2009, Michael S. Zick wrote:
> > > Anyone with suggestions about this one?
> 
> Looks like we should test for presence before we switch off
> autosuspend for khubd. Please test this diagnostic patch if this is
> repeatable.
> 

Super!  Will give it a try in todays build/testing and get back.

Note: If I understand the directions with this debug_vmalloc option,
this dump was caused by reference to a vmalloc'd page that had since
been freed.  I have a copy of the dmesg at boot and the /sys/kernel/debug
list of PTE entries - - if that would help to know what cr2=0..50 was
pointing at.

Mike
> 	Regards
> 		Oliver
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 2af3b4f..c5b3929 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -371,11 +371,16 @@ static void kick_khubd(struct usb_hub *hub)
>  {
>  	unsigned long	flags;
>  
> -	/* Suppress autosuspend until khubd runs */
> -	to_usb_interface(hub->intfdev)->pm_usage_cnt = 1;
> +	if (!hub) {
> +		BUG();
> +		return;
> +	}
>  
>  	spin_lock_irqsave(&hub_event_lock, flags);
>  	if (!hub->disconnected && list_empty(&hub->event_list)) {
> +		/* Suppress autosuspend until khubd runs */
> +		to_usb_interface(hub->intfdev)->pm_usage_cnt = 1;
> +
>  		list_add_tail(&hub->event_list, &hub_event_list);
>  		wake_up(&khubd_wait);
>  	}
> @@ -384,6 +389,11 @@ static void kick_khubd(struct usb_hub *hub)
>  
>  void usb_kick_khubd(struct usb_device *hdev)
>  {
> +	if (!hdev) {
> +		BUG();
> +		return;
> +	}
> +
>  	/* FIXME: What if hdev isn't bound to the hub driver? */
>  	kick_khubd(hdev_to_hub(hdev));
>  }
> 
> 
> 



  reply	other threads:[~2009-07-07 14:32 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-05 22:20 Null Pointer BUG in uhci_hcd Michael S. Zick
2009-07-07  9:13 ` Jiri Kosina
2009-07-07 14:08   ` Oliver Neukum
2009-07-07 14:32     ` Michael S. Zick [this message]
2009-07-07 15:10     ` Alan Stern
2009-07-07 15:23       ` Michael S. Zick
2009-07-07 15:31         ` Alan Stern
2009-07-07 15:43           ` Michael S. Zick
2009-07-07 17:28             ` Alan Stern
2009-07-07 17:56               ` Michael S. Zick
2009-07-07 19:21                 ` Alan Stern
2009-07-07 19:51                   ` Michael S. Zick
2009-07-07 20:00                     ` Alan Stern
2009-07-07 20:52                       ` Michael S. Zick
2009-07-07 21:24                         ` Michael S. Zick
2009-07-08 19:54                           ` Alan Stern
2009-07-08 14:43                   ` Michael S. Zick
2009-07-08 16:30                     ` Michael S. Zick
2009-07-08 16:38                       ` Michael S. Zick
2009-07-11 19:07                         ` uhci_hcd fails to off-line device/hub on error condition Michael S. Zick
2009-07-12 15:16                           ` Alan Stern
2009-07-08 19:57                       ` Null Pointer BUG in uhci_hcd Alan Stern
2009-07-08 20:22                         ` Michael S. Zick
2009-07-08 21:02                           ` Alan Stern
2009-07-08 22:31                             ` Michael S. Zick
2009-07-09 14:18                               ` Alan Stern
2009-07-08 23:56                         ` Michael S. Zick
2009-07-08 23:59                           ` Michael S. Zick
2009-07-09 14:20                           ` Alan Stern
2009-07-09 14:46                             ` Michael S. Zick
2009-07-09 15:08                               ` Alan Stern
2009-07-09 16:07                                 ` Michael S. Zick
2009-07-09 20:58                                   ` Michael S. Zick

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=200907070932.47441.lkml@morethan.org \
    --to=lkml@morethan.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox