HomeFreeBSD

ktrace: fix a race between writes and close

Description

ktrace: fix a race between writes and close

It was possible that termination of ktrace session occured during some
record write, in which case write occured after the close of the vnode.
Use ktr_io_params refcounting to avoid this situation, by taking the
reference on the structure instead of vnode.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D30400

Details

Provenance
kibAuthored on May 22 2021, 12:40 PM
Reviewer
markj
Differential Revision
D30400: ktrace: fix a race between writes and close
Parents
rG48235c377f96: Fix a braino in previous.
Branches
Unknown
Tags
Unknown