HomeFreeBSD

MFC r290140:

Description

MFC r290140:
Add missing NULL check in physio().

When destroying a character device the si_devsw field is set to NULL
before all references are gone, to indicate the character device is
going away. This can cause a NULL-dereference fault inside physio().

The callers of physio() should own a thread reference on the cdev and
if si_devsw is seen as non-NULL, it is usable during the execution of
the function. Else an ENXIO error code is returned.

Reviewed by: kib

Details

Provenance
hselaskyAuthored on
Reviewer
kib
Parents
rS290704: Make the slice names for root configurable. For embedded platforms, we
Branches
Unknown
Tags
Unknown