HomeFreeBSD

tty: fix a panic with INVARIANTS

Description

tty: fix a panic with INVARIANTS

watch'ing a tty triggers a refcount wraparound panic, take a reference
on fp after fget_cap_locked() to fix.

Reported by: Michael Jung <mikej_at_paymentallianceintl.com>
Reviewed by: hselasky, mjg
Fixes: f40dd6c8034b ("tty: switch ttyhook_register to use fget_cap_locked")
Differential Revision: https://reviews.freebsd.org/D34335

Details

Provenance
rewAuthored on Feb 22 2022, 6:22 PM
Reviewer
rGf40dd6c8034b: tty: switch ttyhook_register to use fget_cap_locked
Differential Revision
D34335: tty: fix panic with INVARIANTS
Parents
rG884ba43116d4: powerpc: enable initial-exec TLS
Branches
Unknown
Tags
Unknown