Panic in vm_map_stack

Attilio Rao attilio at freebsd.org
Fri Mar 26 21:40:46 UTC 2010


2010/3/26 pluknet <pluknet at gmail.com>:
> On 26 March 2010 23:10, Tom Judge <tom at 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


More information about the freebsd-hackers mailing list