cvs commit: src/lib/libkse/thread thr_kern.c

Daniel Eischen deischen at FreeBSD.org
Wed Dec 5 22:04:02 PST 2007


deischen    2007-12-06 06:04:02 UTC

  FreeBSD src repository

  Modified files:
    lib/libkse/thread    thr_kern.c 
  Log:
  Set the tcb (thread control block) in the child process after a fork.
  This protects against a race with an upcall in the parent during the
  fork which can clobber the parent's tcb before the vm space is copied
  in the child.  The child then gets a corrupted tcb that is either null
  or that points to another thread that doesn't exist in the child (after
  a fork, only the fork()ing thread exists in the child).
  
  Reported by:    Arno J. Klaassen (arno at heho / snv / jussieu / fr)
  
  Revision  Changes    Path
  1.128     +13 -0     src/lib/libkse/thread/thr_kern.c


More information about the cvs-all mailing list