Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 27 Aug 2002 15:56:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 27 Aug 2002 15:56:06 -0400 Received: from tapu.f00f.org ([66.60.186.129]:38579 "EHLO tapu.f00f.org") by vger.kernel.org with ESMTP id ; Tue, 27 Aug 2002 15:56:05 -0400 Date: Tue, 27 Aug 2002 13:00:25 -0700 From: Chris Wedgwood To: Thunder from the hill Cc: Alan Cox , Zheng Jian-Ming , Linux Kernel Mailing List Subject: Re: problems with changing UID/GID Message-ID: <20020827200025.GA8985@tapu.f00f.org> References: <20020827181207.GA8578@tapu.f00f.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-No-Archive: Yes Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 842 Lines: 25 On Tue, Aug 27, 2002 at 01:08:04PM -0600, Thunder from the hill wrote: And how do you protect a caller from having to wait for the lock? You don't. If they have to wait, then they wait. You'd need a lock count here, where you can only change the credentials when the count is zero. But when will that ever be? It depends... for most non-threaded applications, immediately... for threaded applications with lots of (day) disk IO, it could be indefinite. And btw, the count bumping/downing does cost. Almost immeasurable. [sg]et[eu]id doesn't get called that often. --cw - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/