Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Mar 2001 11:21:46 -0800 (PST)
From:      Bosko Milekic <bmilekic@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern uipc_syscalls.c
Message-ID:  <200103081921.f28JLkU41476@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bmilekic    2001/03/08 11:21:46 PST

  Modified files:
    sys/kern             uipc_syscalls.c 
  Log:
  Fix is a similar race condition as existed in the mbuf code. When we go
  into an interruptable sleep and we increment a sleep count, we make sure
  that we are the thread that will decrement the count when we wakeup.
  Otherwise, what happens is that if we get interrupted (signal) and we
  have to wake up, but before we get our mutex, some thread that wants
  to wake us up detects that the count is non-zero and so enters wakeup_one(),
  but there's nothing on the sleep queue and so we don't get woken up. The
  thread will still decrement the sleep count, which is bad because we will
  also decrement it again later (as we got interrupted) and are already off
  the sleep queue.
  
  Revision  Changes    Path
  1.88      +8 -7      src/sys/kern/uipc_syscalls.c


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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