cvs commit: src/sys/kern sys_socket.c

Nate Lawson nate at root.org
Tue Mar 30 11:02:00 PST 2004


On Sun, 28 Mar 2004, Robert Watson wrote:
>   Modified files:
>     sys/kern             sys_socket.c
>   Log:
>   Conditionally acquire Giant when entering the socket layer via file
>   descriptor operations based on debug.mpsafenet, rather than acquiring
>   Giant unconditionally.
>
>   Revision  Changes    Path
>   1.56      +6 -6      src/sys/kern/sys_socket.c

This adds a small race if someone happens to disable debug.mpsafenet while
a thread is holding Giant.  This may not be an issue since this is only a
debugging sysctl and shouldn't be changed during network operation.
Still, it's important to note this.

I've been finishing up ACPI locking and revisited a similar issue in the
embedded controller driver.  When changing use of the global lock, I
acquire the outer lock so I am certain no one is holding the inner lock
and neglects to release it on the way out of a function because the global
lock flag changed.

-Nate


More information about the cvs-src mailing list