git: DragonFly_RELEASE_5_8 kernel - Refactor kern_kevent(), fix timeout overflow (ppoll() bug)

Matthew Dillon dillon at
Wed Jun 10 14:03:18 PDT 2020

commit dd5657c43ef9c3bfc80e4008bdfd3711237bf13f
Author: Matthew Dillon <dillon at>
Date:   Thu Jun 4 16:33:04 2020 -0700

    kernel - Refactor kern_kevent(), fix timeout overflow (ppoll() bug)
    * Fix a bug where large timeouts or very small timeouts could
      overflow the ustimeout variable.  Change the internal timeout
      cap to ensure that no overflow occurs.
    * Fix another bug where the internal timeout cap could cause
      ppoll() to return early.  Internal tsleep (etc) timeouts
      need to be ignored because the external timeout might be
      larger and will handle the error return for us when it is
    * Refactor kern_kevent() to be somewhat more efficient.
    Reported-by: rsmarples

Summary of changes:
 sys/kern/kern_event.c | 166 +++++++++++++++++++++++++++++---------------------
 sys/sys/event.h       |   4 ++
 2 files changed, 101 insertions(+), 69 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list