HomeFreeBSD

osd: Fix racy assertions

Description

osd: Fix racy assertions

osd_register(9) may reallocate and expand the destructor array for a
given object type if no space is available for a new key. This happens
with the object lock held. Thus, when verifying that a given slot in
the array is occupied, we need to hold the object lock to avoid racing
with a reallocation.

Reported by: syzbot+69ce54c7d7d813315dd3@syzkaller.appspotmail.com
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 187afc58791cd877c8ba0573b7826c31db8c6f73)

Details

Provenance
markjAuthored on Sep 9 2021, 1:50 PM
Parents
rG8895170347fc: bnxt(4): Fix bugs in WOL support.
Branches
Unknown
Tags
Unknown