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

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Jun 10 14:03:18 PDT 2020


commit dd5657c43ef9c3bfc80e4008bdfd3711237bf13f
Author: Matthew Dillon <dillon at apollo.backplane.com>
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
      checked.
    
    * 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(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/dd5657c43ef9c3bfc80e4008bdfd3711237bf13f


-- 
DragonFly BSD source repository



More information about the Commits mailing list