Re: SLUB Corruption from witin drivers/usb/core/devio.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 14 May 2012, Oncaphillis wrote:

> <snip>
>   === proc_do_submiturb uurb->type==1:USBDEVFS_URB_TYPE_INTERRUPT alloc 
> tb:0xffff880077cfadf0 (512)
>   === async_completed status==0 length:2/512 e=0 
> tb:0xffff880077cfadf0[00][41] last tb:0xffff880079612690[6b][6b]
>   === free_async free tb:0xffff880077cfadf0
>   === proc_do_submiturb uurb->type==1:USBDEVFS_URB_TYPE_INTERRUPT alloc 
> tb:0xffff880077cfadf0 (512)
>   === async_completed status==-2 length:0/512 e=0 
> tb:0xffff880077cfadf0[6b][6b] last tb:0xffff880077cfadf0[6b][6b]
>   === free_async free tb:0xffff880077cfadf0
>   === proc_do_submiturb uurb->type==3:USBDEVFS_URB_TYPE_BULK alloc 
> tb:0xffff880079612690 (2)
>   === async_completed status==0 length:2/2 e=0 
> tb:0xffff880079612690[9d][8d] last tb:0xffff880077cfadf0[9d][8d]
>   === free_async free tb:0xffff880079612690
>   =============================================================================
>   BUG kmalloc-512 (Not tainted): Poison overwritten
>   -----------------------------------------------------------------------------
>   INFO: 0xffff880077cfadf0-0xffff880077cfadf1. First byte 0x9d instead 
> of 0x6b
> </snip>

This gives me an idea for what the problem might be.  Basically, 
ehci-hcd does not do a good job of unlinking interrupt transfers.

In drivers/usb/host/ehci-sched.c:intr_deschedule(), you'll find this 
code:

	if (list_empty (&qh->qtd_list)
			|| (cpu_to_hc32(ehci, QH_CMASK)
					& hw->hw_info2) != 0)
		wait = 2;
	else
		wait = 55;	/* worst case: 3 * 1024 */

	udelay (wait);

I suspect the values for "wait" are much too small.  The EHCI 
specification doesn't really say what they should be.  Try 
replacing the entire code snippet above with

	udelay(1000);

and see if that makes any difference.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux