Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2010 22:40:45 +0100
From:      Attilio Rao <attilio@freebsd.org>
To:        pluknet <pluknet@gmail.com>
Cc:        Tom Judge <tom@tomjudge.com>, Kostik Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: Panic in vm_map_stack
Message-ID:  <3bbf2fe11003261440x15d07d54i4bae8e67e917736d@mail.gmail.com>
In-Reply-To: <a31046fc1003261407t32a8f8b9s15646328ef574704@mail.gmail.com>
References:  <4BACF92E.60600@tomjudge.com> <20100326195659.GU2415@deviant.kiev.zoral.com.ua> <4BAD1498.5040402@tomjudge.com> <a31046fc1003261407t32a8f8b9s15646328ef574704@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/3/26 pluknet <pluknet@gmail.com>:
> On 26 March 2010 23:10, Tom Judge <tom@tomjudge.com> 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



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