HomeFreeBSD

fifo: Explicitly initialize generation numbers when opening

Description

fifo: Explicitly initialize generation numbers when opening

The fi_rgen and fi_wgen fields are generation numbers used when sleeping
waiting for the other end of the fifo to be opened. The fields were not
explicitly initialized after allocation, but this was harmless. To
avoid false positives from KMSAN, though, ensure that they get
initialized to zero.

Reported by: KMSAN
Sponsored by: The FreeBSD Foundation

(cherry picked from commit b9ca419a21d109948bf0fcea5c59725f1fe0cd7b)

Details

Provenance
markjAuthored on Jul 13 2021, 9:45 PM
Parents
rG978804184224: uart: Fix an out-of-bounds read in ns8250_bus_probe()
Branches
Unknown
Tags
Unknown