Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2004 11:02:00 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern sys_socket.c
Message-ID:  <20040330105844.B81785@root.org>
In-Reply-To: <20040329015546.85A3016A4F3@hub.freebsd.org>
References:  <20040329015546.85A3016A4F3@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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