UDC ep0 desc or no desc

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

 



Hi folks !

I noticed some UDC drivers setup a "desc" pointer for ep0.desc for the
driver, some don't.

Is it officially needed ?

Additionally some UCDs NULL out the desc pointer in ep_disable, is that
also a requirement ?

I somewhat fear that if somebody calls stuff like usb_ep_align() on ep0
it will crash without a valid desc pointer...

That leads me to wonder, should we sprinkle null checks (and maybe
WARN_ON_ONCE) on some of those accessors to catch those cases ?

I notices a few reports (and I'm about to debug one with my own UDC,
aspeed vhub when I'm back at work on Monday, with HID) where we get a
crash with a NULL dereference and while I don't know for sure yet
that's the problem, the fact that EP0 has a NULL desc with most UDCs
and that we clear the desc on EP disablement somewhat tickles me the
wrong way...

Cheers,
Ben.


--
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