HomeFreeBSD

tun/tap: close race between destroy/ioctl handler

Description

tun/tap: close race between destroy/ioctl handler

It seems that there should be a better way to handle this, but this seems to
be the more common approach and it should likely get replaced in all of the
places it happens... Basically, thread 1 is in the process of destroying the
tun/tap while thread 2 is executing one of the ioctls that requires the
tun/tap mutex and the mutex is destroyed before the ioctl handler can
acquire it.

This is only one of the races described/found in PR 233955.

PR: 233955
Reviewed by: ae
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20027

Details

Provenance
kevansAuthored on
Reviewer
ae
Differential Revision
D20027: tun/tap: close race between destroy/ioctl handler
Parents
rS346669: MFC r346229 and r346248:
Branches
Unknown
Tags
Unknown