linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Artem S. Tashkinov" <t.artem@lycos.com>,
	bp@alien8.de, pavel@ucw.cz, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, security@kernel.org,
	linux-media@vger.kernel.org, linux-usb@vger.kernel.org,
	alsa-devel@alsa-project.org
Subject: Re: A reliable kernel panic (3.6.2) and system crash when visiting a particular website
Date: Mon, 22 Oct 2012 17:30:02 +0200	[thread overview]
Message-ID: <5085667A.70408@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1210221116040.1724-100000@iolanthe.rowland.org>

On 22.10.2012 17:17, Alan Stern wrote:
> On Sun, 21 Oct 2012, Artem S. Tashkinov wrote:
> 
>> dmesg messages up to a crash can be seen here: https://bugzilla.kernel.org/attachment.cgi?id=84221
> 
> The first problem in the log is endpoint list corruption.  Here's a 
> debugging patch which should provide a little more information.

Maybe add a BUG() after each of these dev_err() so we stop at the first
occurance and also see where we're coming from?




>  drivers/usb/core/hcd.c |   36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
> 
> Index: usb-3.6/drivers/usb/core/hcd.c
> ===================================================================
> --- usb-3.6.orig/drivers/usb/core/hcd.c
> +++ usb-3.6/drivers/usb/core/hcd.c
> @@ -1083,6 +1083,8 @@ EXPORT_SYMBOL_GPL(usb_calc_bus_time);
>  
>  /*-------------------------------------------------------------------------*/
>  
> +static bool list_error;
> +
>  /**
>   * usb_hcd_link_urb_to_ep - add an URB to its endpoint queue
>   * @hcd: host controller to which @urb was submitted
> @@ -1126,6 +1128,20 @@ int usb_hcd_link_urb_to_ep(struct usb_hc
>  	 */
>  	if (HCD_RH_RUNNING(hcd)) {
>  		urb->unlinked = 0;
> +
> +		{
> +			struct list_head *cur = &urb->ep->urb_list;
> +			struct list_head *prev = cur->prev;
> +
> +			if (prev->next != cur && !list_error) {
> +				list_error = true;
> +				dev_err(&urb->dev->dev,
> +					"ep %x list add corruption: %p %p %p\n",
> +					urb->ep->desc.bEndpointAddress,
> +					cur, prev, prev->next);
> +			}
> +		}
> +
>  		list_add_tail(&urb->urb_list, &urb->ep->urb_list);
>  	} else {
>  		rc = -ESHUTDOWN;
> @@ -1193,6 +1209,26 @@ void usb_hcd_unlink_urb_from_ep(struct u
>  {
>  	/* clear all state linking urb to this dev (and hcd) */
>  	spin_lock(&hcd_urb_list_lock);
> +	{
> +		struct list_head *cur = &urb->urb_list;
> +		struct list_head *prev = cur->prev;
> +		struct list_head *next = cur->next;
> +
> +		if (prev->next != cur && !list_error) {
> +			list_error = true;
> +			dev_err(&urb->dev->dev,
> +				"ep %x list del corruption prev: %p %p %p\n",
> +				urb->ep->desc.bEndpointAddress,
> +				cur, prev, prev->next);
> +		}
> +		if (next->prev != cur && !list_error) {
> +			list_error = true;
> +			dev_err(&urb->dev->dev,
> +				"ep %x list del corruption next: %p %p %p\n",
> +				urb->ep->desc.bEndpointAddress,
> +				cur, next, next->prev);
> +		}
> +	}
>  	list_del_init(&urb->urb_list);
>  	spin_unlock(&hcd_urb_list_lock);
>  }
> 


  reply	other threads:[~2012-10-22 15:30 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 12:06 A reliable kernel panic (3.6.2) and system crash when visiting a particular website Artem S. Tashkinov
2012-10-20 16:27 ` Borislav Petkov
2012-10-20 17:41   ` Artem S. Tashkinov
2012-10-20 18:04     ` Borislav Petkov
2012-10-20 20:57       ` Artem S. Tashkinov
2012-10-20 22:00       ` Artem S. Tashkinov
2012-10-20 20:32     ` Pavel Machek
2012-10-20 22:58       ` Borislav Petkov
2012-10-20 23:15         ` Artem S. Tashkinov
2012-10-21  0:24           ` Borislav Petkov
2012-10-21  1:57             ` Artem S. Tashkinov
2012-10-21 11:08               ` Borislav Petkov
2012-10-21 11:59                 ` Artem S. Tashkinov
2012-10-21 12:03                   ` Daniel Mack
2012-10-21 12:30                     ` Artem S. Tashkinov
2012-10-21 14:21                       ` was: " Daniel Mack
2012-10-21 14:57                         ` Artem S. Tashkinov
2012-10-21 15:22                           ` Daniel Mack
2012-10-21 15:28                             ` Alan Stern
2012-10-21 12:12                   ` Daniel Mack
2012-10-21 15:23                   ` Re: Re: Re: " Alan Stern
2012-10-21 22:20                     ` A strange Linux 3.6 bug: corrupted page table Artem S. Tashkinov
2012-10-21 17:03                   ` Re: Re: Re: Re: A reliable kernel panic (3.6.2) and system crash when visiting a particular website Borislav Petkov
2012-10-21 19:49                     ` Artem S. Tashkinov
2012-10-21 19:54                       ` Daniel Mack
2012-10-21 20:43                         ` Artem S. Tashkinov
2012-10-21 21:00                           ` Daniel Mack
2012-10-21 20:36                       ` Re: Re: Re: Re: " Borislav Petkov
2012-10-22 15:17                       ` Alan Stern
2012-10-22 15:30                         ` Daniel Mack [this message]
2012-10-22 15:54                           ` Alan Stern
2012-10-22 17:30                             ` Artem S. Tashkinov
2012-10-22 18:01                               ` Alan Stern
2012-10-21  2:19           ` Alan Stern
2012-10-21 10:34           ` Daniel Mack
2012-10-21 11:59             ` Daniel Mack
2012-11-03 14:10           ` Christof Meerwald
2012-11-03 14:16             ` Daniel Mack
2012-11-03 14:28               ` Sven-Haegar Koch
2012-11-05 19:13               ` Christof Meerwald
2012-11-07 17:34                 ` Alan Stern
2012-11-07 19:19                   ` Takashi Iwai
2012-11-07 20:37                     ` Alan Stern
2012-11-08  6:48                       ` Takashi Iwai
2012-11-07 20:46                     ` Christof Meerwald
2012-11-07 20:59                     ` Artem S. Tashkinov
2012-11-08  0:42                     ` Daniel Mack
2012-11-08  6:43                       ` Takashi Iwai
2012-11-08  7:31                         ` Daniel Mack
2012-11-08  8:09                           ` Takashi Iwai
2012-11-08 15:55                             ` Alan Stern
2012-11-08 15:58                               ` Takashi Iwai

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=5085667A.70408@gmail.com \
    --to=zonque@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=security@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=t.artem@lycos.com \
    /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;
as well as URLs for NNTP newsgroup(s).