Check the validity of the `qtd' pointer after each interrupt case
authorvisa <visa@openbsd.org>
Tue, 20 Jun 2017 15:49:00 +0000 (15:49 +0000)
committervisa <visa@openbsd.org>
Tue, 20 Jun 2017 15:49:00 +0000 (15:49 +0000)
commitbd38a9bdcd5e888bff7de4d3a7713580f6a52c14
tree3d1717dde22b986d458934f937e088f26c48c8c2
parent608dd9d157c752796f552d21c6e9d8296abd7990
Check the validity of the `qtd' pointer after each interrupt case
and bail out if the pointer has become invalid. This prevents
use-after-free memory accesses that corrupted the dwc2qtd pool.

This fix improves stability on the Raspberry Pi 3.

From Linux commit dc8730846948e517169f630826cd2c97615f5ee8
OK kettenis@
sys/dev/usb/dwc2/dwc2_hcdintr.c