2003-11-03 03:55:28

by David Brownell

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: serious 2.6 bug in USB subsystem?


> David> I'm not sure that if the HID driver were to pass a null
> David> buffer pointer, it would be caught anywhere.
>
> OK, I'll try to find some time to trace the I/O MMU calls to see if
> something isn't kosher at that level. Is there a good way of getting
> a relatively high-level of tracing in the USB subsystem that would
> some me what's going on between the HID and the core USB level?

Most of that story is just submitting and completing URBs.

I'd either try changing the spots in drivers/usb/core/hcd.c
marked as appropriate for generic MONITOR_URB hooks (printk
if it's your HID device, maybe), or manually turn on whatever
HCD-specific hooks exist (maybe use a VERBOSE message level).

Such a thing wasn't possible in 2.4 since there were too
many different bizarre (and sometimes buggy) ways for URBs
to return to the usb device drivers and get implicitly
resubmitted.

- Dave





2003-11-03 21:26:05

by David Mosberger

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: serious 2.6 bug in USB subsystem?

>>>>> On Sun, 02 Nov 2003 19:46:38 -0800, David Brownell <[email protected]> said:

David> I'm not sure that if the HID driver were to pass a null
David> buffer pointer, it would be caught anywhere.
>> OK, I'll try to find some time to trace the I/O MMU calls to see
>> if something isn't kosher at that level. Is there a good way of
>> getting a relatively high-level of tracing in the USB subsystem
>> that would some me what's going on between the HID and the core
>> USB level?

Dave.B> Most of that story is just submitting and completing URBs.

Yeah. And it appears that it's the very first call to
hid_submit_ctrl() that's triggering the problem (not always, but about
9 out of 10 times). I dumped some of the key fields for the URB being
submitted and they all looked saned to me.

Dave.B> I'd either try changing the spots in drivers/usb/core/hcd.c
Dave.B> marked as appropriate for generic MONITOR_URB hooks (printk
Dave.B> if it's your HID device, maybe), or manually turn on
Dave.B> whatever HCD-specific hooks exist (maybe use a VERBOSE
Dave.B> message level).

OK, thanks for the suggestion. I'll keep looking, but will be on
travel this week, so I may not be able to spend much time on this
problem.

--david