CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2020/01/16 02:59:26
Modified files:
sys/dev : video.c
sys/dev/usb : uvideo.c
Log message:
Free data structures after closing the pseudo-device with vdevgone(9).
Pseudo-drivers exposing a userland interface generally start & stop I/O
in *_open() and *_close() respectively. So it isn't safe to detach such
device while it is still open, because I/O might still be in flight.
A more generic fix would be to detach children devices before the parents.
Fix a race reported by Kevin Chadwick on bugs@.
Discussed with Peter Stuge, tested by and ok zhuk@