Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2012 10:12:22 +0400
From:      Andrey Zonov <zont@FreeBSD.org>
To:        freebsd-arch@freebsd.org
Subject:   Re: [patch] unprivileged mlock(2)
Message-ID:  <504055C6.8060704@FreeBSD.org>
In-Reply-To: <503F476E.1010505@FreeBSD.org>
References:  <503DD433.2030108@FreeBSD.org> <201208290906.q7T96C9j032802@gw.catspoiler.org> <20120829092318.GW33100@deviant.kiev.zoral.com.ua> <503F2D24.8050103@FreeBSD.org> <503F476E.1010505@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig16ACCA67F278F16EE0A13A8C
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- 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_si=
ze_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
>>  	}
>>
>>  	/*
>>
>=20
> I put '#endif' in the wrong place, corrected patch is here [2].
>=20

We don't need this patch, because accounting code doesn't add any extra
process locking here.


--=20
Andrey Zonov


--------------enig16ACCA67F278F16EE0A13A8C
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJQQFXJAAoJEBWLemxX/CvTep0H/i30DoHwh+oEgXdpIawicSVN
HrRouTTJqG7+bR/qNoXmN0VHZfQtO+mD+MmuTq9jkHS2GwnJKBjACFYqT40vOLTt
hd2YxYtec82WpjZoIfadM5xjSI5faBbAY8IVrLKt3/Sy9Zoc+qZ/XrDN9+LP1G1N
ZX6NsZnI5mvDMo++2f90NE1CB4C0Hryobvz22wy468R5+q6uDi7ZfcwEVzCJuq8/
/+LLQRMe49Q8igjnMzF560mcd5+MLFdjTG1O/yaMCQUgeux1+nvPPINBZElcDcBu
pPRjqpa1v+pY8DH5s/bRNz3qmynepb3eke+tHDHkTdxDt8EEV3mhvZv+gTEFaLk=
=ZbPd
-----END PGP SIGNATURE-----

--------------enig16ACCA67F278F16EE0A13A8C--



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