From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 26 21:40:46 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A601106566C for ; Fri, 26 Mar 2010 21:40:46 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f183.google.com (mail-iw0-f183.google.com [209.85.223.183]) by mx1.freebsd.org (Postfix) with ESMTP id 575AD8FC08 for ; Fri, 26 Mar 2010 21:40:46 +0000 (UTC) Received: by iwn13 with SMTP id 13so7063560iwn.14 for ; Fri, 26 Mar 2010 14:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:received:message-id:subject :from:to:cc:content-type; bh=HBZx5HMbzsxU2sYr46h0VP9dKzS4lZH+2ywVXUxmu7I=; b=m+BOVhjEQZje5zRvVs+CxRY7ow94FNfnmcmDt0FuqY3f1oDiKHtYrx779vJhOp6Daj qnGwzv80dKESrYaeQ2kDGvqB04UFth8FYAkEzGEdrZw/11UtS3qgCLvzDudEhYsjdipw +HoTqT4Xa5Hoq5ifnEqi3zfTSZcZeMg14hiTs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=lXr9bNBq0BcOUkSHfcpT7k3pBx8xpVSiX2vDD+5R9oO4/xYhC9nL22wRUohEkn5niS xyyn8Et7LkwlYUhzQHODzHfFgqYKQt31HV2uPAYuG/qfKzrz8667N4cymXi9Z3llyeCr NpxuwZfgw2n5320rbYxnDrwbUcwYJcZpb7C3k= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.155.74 with HTTP; Fri, 26 Mar 2010 14:40:45 -0700 (PDT) In-Reply-To: References: <4BACF92E.60600@tomjudge.com> <20100326195659.GU2415@deviant.kiev.zoral.com.ua> <4BAD1498.5040402@tomjudge.com> Date: Fri, 26 Mar 2010 22:40:45 +0100 X-Google-Sender-Auth: b0b45320e398648a Received: by 10.231.145.206 with SMTP id e14mr733609ibv.10.1269639645566; Fri, 26 Mar 2010 14:40:45 -0700 (PDT) Message-ID: <3bbf2fe11003261440x15d07d54i4bae8e67e917736d@mail.gmail.com> From: Attilio Rao To: pluknet Content-Type: text/plain; charset=UTF-8 Cc: Tom Judge , Kostik Belousov , freebsd-hackers@freebsd.org Subject: Re: Panic in vm_map_stack X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 21:40:46 -0000 2010/3/26 pluknet : > On 26 March 2010 23:10, Tom Judge wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> This is the function, I am guessing that I need to unlock the proc >> before calling vmspace_free ? >> >> > > As far as I know you cannot lock a process around > locking vmspace and/or vm_map (at least on 6.x). > I used process reference counting for that purpose. > Sort of the following mumble.. Generally that is true for vm_map_lock() because it is a sx_lock (thus sleeping) but in this case it is used a trylock operation that won't sleep (and I assume that is why it is used), thus it is not a problem. The vmspace refcounting doesn't impose any extra-constraint instead, thus the lock dance is not required here I think. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein