[patch] unprivileged mlock(2)
Andrey Zonov
zont at FreeBSD.org
Thu Aug 30 10:59:06 UTC 2012
On 8/30/12 1:06 PM, Andrey Zonov wrote:
> Hi,
>
> So, I've got the first version of the patch (attached) which fixes
> memory locked limit checking and accounting.
>
> I also want to change 'pmap_wired_count(vm_map_pmap(map))' with
> 'vmspace_wired_count(vmspace)'
It's here [1].
> 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].
[1] http://people.freebsd.org/~zont/vm_mmap.c.patch
[2] http://people.freebsd.org/~zont/racct.patch
--
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/20120830/12d1dbc8/signature.pgp
More information about the freebsd-arch
mailing list