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
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31197

Details

Provenance
markjAuthored on Jul 16 2021, 2:38 AM
Reviewer
asomers
Differential Revision
D31197: lio_listio: Don't post a completion notification if none was requested
Parents
rG9c97062b6201: libc: Use the initial-exec TLS model
Branches
Unknown
Tags
Unknown