Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2008 09:59:40 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_event.c kern_fork.c src/sys/sys event.h
Message-ID:  <200807211000.m6LA0BRT084664@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
kib         2008-07-21 09:59:40 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sys/kern             kern_event.c kern_fork.c 
    sys/sys              event.h 
  Log:
  SVN rev 180653 on 2008-07-21 09:59:40Z by kib
  
  MFC r180340:
  
  The kqueue_register() function assumes that it is called from the top of
  the syscall code and acquires various event subsystem locks as needed.
  The handling of the NOTE_TRACK for EVFILT_PROC is currently done by
  calling the kqueue_register() from filt_proc() filter, causing recursive
  entrance of the kqueue code. This results in the LORs and recursive
  acquisition of the locks.
  
  Implement the variant of the knote() function designed to only handle
  the fork() event. It mostly copies the knote() body, but also handles
  the NOTE_TRACK, removing the handling from the filt_proc(), where it
  causes problems described above. The function is called from the fork1()
  instead of knote().
  
  When encountering NOTE_TRACK knote, it marks the knote as influx
  and drops the knlist and kqueue lock. In this context call to
  kqueue_register is safe from the problems.
  
  An error from the kqueue_register() is reported to the observer as
  NOTE_TRACKERR fflag.
  
  PR:     108201
  
  Revision   Changes    Path
  1.113.2.4  +67 -15    src/sys/kern/kern_event.c
  1.282.2.4  +2 -4      src/sys/kern/kern_fork.c
  1.37.2.2   +1 -0      src/sys/sys/event.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807211000.m6LA0BRT084664>