HomeFreeBSD

fget_unlocked() depends on the freed struct file f_count field being

Description

fget_unlocked() depends on the freed struct file f_count field being
zero. The file_zone if no-free, but r284861 added trashing of the
freed memory. Most visible manifestation of the issue were 'memory
modified after free' panics for the file zone, triggered from
falloc_noinstall().

Add UMA_ZONE_ZINIT flag to turn off trashing. Mjg noted that it makes
sense to not trash freed memory for any non-free zone, which will be
done later.

Reported and tested by: pho
Discussed with: mjg
Sponsored by: The FreeBSD Foundation

Details

Provenance
kibAuthored on
Parents
rS286920: Remove redundant mp_naps from ARM64 secondary CPU start-up code
Branches
Unknown
Tags
Unknown