HomeFreeBSD

lio_listio: Don't post a completion notification if none was requested

Description

lio_listio: Don't post a completion notification if none was requested

One is allowed to use LIO_NOWAIT without specifying a sigevent. In this
case, lj->lioj_signal is left uninitialized, but several code paths
examine liov_signal.sigev_notify to figure out which notification to
post. Unconditionally initialize that field to SIGEV_NONE.

Add a dumb test case which triggers the bug.

Reported by: KMSAN+syzkaller
Reviewed by: asomers
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 2e5f6152952e4cfbaab3d96368c3dc4218786632)

Details

Provenance
markjAuthored on Jul 16 2021, 2:38 AM
Parents
rG24c558ca3c04: imgact_elf: Avoid redefining suword()
Branches
Unknown
Tags
Unknown