From owner-cvs-all@FreeBSD.ORG Tue Mar 30 07:56:16 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 855D316A4CE; Tue, 30 Mar 2004 07:56:16 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E84D43D3F; Tue, 30 Mar 2004 07:56:16 -0800 (PST) (envelope-from nectar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i2UFuGGe041411; Tue, 30 Mar 2004 07:56:16 -0800 (PST) (envelope-from nectar@repoman.freebsd.org) Received: (from nectar@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i2UFuGhL041410; Tue, 30 Mar 2004 07:56:16 -0800 (PST) (envelope-from nectar) Message-Id: <200403301556.i2UFuGhL041410@repoman.freebsd.org> From: Jacques Vidrine Date: Tue, 30 Mar 2004 07:56:16 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/include nss_tls.h src/lib/libc/net nsdispatch.c nss_compat.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2004 15:56:16 -0000 nectar 2004/03/30 07:56:15 PST FreeBSD src repository Modified files: lib/libc/include nss_tls.h lib/libc/net nsdispatch.c nss_compat.c Log: When a dynamic NSS module is built and linked against a thread library, it may pull in that thread library at run time. If the process started out single-threaded, this could cause attempts to release locks that do not exist. Guard against this possibility by checking __isthreaded before invoking thread primitives. A similar problem remains if the process is linked against one thread library, but the NSS module is linked against another. This can only be avoided by careful design of the NSS module. Submitted by: Sean McNeil (mostly; bugs are mine) Revision Changes Path 1.3 +1 -1 src/lib/libc/include/nss_tls.h 1.11 +39 -20 src/lib/libc/net/nsdispatch.c 1.3 +3 -2 src/lib/libc/net/nss_compat.c