HomeFreeBSD

Check tty_gone() after allocating IO buffers. The tty lock has to be

Description

Check tty_gone() after allocating IO buffers. The tty lock has to be
dropped then reacquired due to using M_WAITOK, which opens a window in
which the tty device can disappear. Check for this and return ENXIO
back up the call chain so that callers can cope.

This closes a race where TF_GONE would get set while buffers were being
allocated as part of ttydev_open(), causing a subsequent call to
ttydevsw_modem() later in ttydev_open() to assert.

Reported by: pho
Reviewed by: kib

Details

Provenance
ianAuthored on Jan 13 2017, 4:37 PM
Parents
rG2f21ec0129dc: libgcc_s: add libc DT_NEEDED to fix underlinking
Branches
Unknown
Tags
Unknown

Event Timeline