HomeFreeBSD

Fix race in case of device destruction.

Description

Fix race in case of device destruction.

During device destruction it is possible that open() succeed, but
fdevname() return NULL, that can't be assigned to string variable.
Fix that by adding explicit NULL check.

Also while there switch from fdevname() to fdevname_r().

Sponsored by: iXsystems, Inc.
MFC after: 2 weeks

(cherry picked from commit e49d3eb40324eaffaa13b93f2c4173dfa04dfa34)

Details

Provenance
mavAuthored on Apr 13 2021, 3:19 PM
Parents
rG7bed7043e216: __FreeBSD_version: update the references to the doc tree
Branches
Unknown
Tags
Unknown