svn commit: r311287 - head/lib/libc/x86/sys
Ngie Cooper (yaneurabeya)
yaneurabeya at gmail.com
Thu Jan 5 10:12:56 UTC 2017
> On Jan 4, 2017, at 08:10, Konstantin Belousov <kib at freebsd.org> wrote:
>
> Author: kib
> Date: Wed Jan 4 16:10:52 2017
> New Revision: 311287
> URL: https://svnweb.freebsd.org/changeset/base/311287
>
> Log:
> __vdso_gettc(): be extra careful with /dev/hpet mappings, never unmap
> the mapping which might be accessed by other threads.
>
> If a pointer to the /dev/hpet register page mapping was stored into
> the hpet_dev_map, other threads might access the page at any time.
> Never unmap it, instead, keep track of mappings for all hpet units in
> smal array. Store pointer to the newly mapped registers page using
> CAS, to detect parallel mappings.
>
> It appeared relatively easy to demonstrate the problem by arranging
> two threads which perform gettimeofday(2) concurently, first time in
> the process address space, when HPET is used for timecounter.
>
> PR: 215715
> Sponsored by: The FreeBSD Foundation
> MFC after: 1 week
Thank you very much for the work! I’ll try to reproduce the bug again with the ATF test.
-Ngie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20170105/3d85fa88/attachment.sig>
More information about the svn-src-all
mailing list