[Bug 251515] lio_listio(2) never sends kevent if nent==0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Dec 2 00:50:09 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251515

            Bug ID: 251515
           Summary: lio_listio(2) never sends kevent if nent==0
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: asomers at FreeBSD.org

It may seem stupid, but you can call lio_listio(2) with an empty aiocb list.  I
would naively expect lio_listio to do nothing and return in that case.  Indeed,
that's what it does when mode == LIO_WAIT.  However, if mode == LIO_NOWAIT and
sigev_notify == SIGEV_KEVENT, no event is ever delivered.

The problem can be demonstrated by the
sys/aio/lio_test:lio_listio_empty_nowait_kevent test case.

Since the Open Group's AIO specification never mentions kevent, we get to make
the call on what to do.  jhb and I agree that sending immediate notification is
sensible.

This was originally reported as bug 220398, but that bug really turned out to
be two bugs.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list