git: kernel - Fix rare wait*() deadlock

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Feb 14 21:47:19 PST 2020


commit f071b5e0ac2d04b0dc5a9f0ca7710ba8ead09c21
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Feb 14 21:37:32 2020 -0800

    kernel - Fix rare wait*() deadlock
    
    * It is possible for the kernel to deadlock two processes or process
      threads attempting to wait*() on the same pid.
    
    * Fix by adding a bit of magic to give ownership of the reaping
      operation to one of the waiters, and causing the other waiters
      to skip/reject that pid.

Summary of changes:
 sys/kern/kern_exit.c | 19 +++++++++++++++++++
 sys/kern/kern_proc.c | 52 +++++++++++++++++++++++++++++++++++++++++++++-------
 sys/sys/proc.h       |  5 +++++
 3 files changed, 69 insertions(+), 7 deletions(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list