[patch] unprivileged mlock(2)
Andrey Zonov
zont at FreeBSD.org
Fri Aug 31 06:12:28 UTC 2012
On 8/30/12 2:58 PM, Andrey Zonov wrote:
> On 8/30/12 1:06 PM, Andrey Zonov wrote:
>> Index: sys/vm/vm_mmap.c
>> ===================================================================
>> --- sys/vm/vm_mmap.c (revision 239611)
>> +++ sys/vm/vm_mmap.c (working copy)
>> @@ -1483,11 +1483,13 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t
>> PROC_UNLOCK(td->td_proc);
>> return (ENOMEM);
>> }
>> +#ifdef RACCT
>> if (racct_set(td->td_proc, RACCT_VMEM, map->size + size)) {
>> PROC_UNLOCK(td->td_proc);
>> return (ENOMEM);
>> }
>> PROC_UNLOCK(td->td_proc);
>> +#endif
>> }
>>
>> /*
>>
>
> I put '#endif' in the wrong place, corrected patch is here [2].
>
We don't need this patch, because accounting code doesn't add any extra
process locking here.
--
Andrey Zonov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 535 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20120831/a8431433/signature.pgp
More information about the freebsd-arch
mailing list