> On Jan 4, 2017, at 08:10, Konstantin Belousov <k...@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
signature.asc
Description: Message signed with OpenPGP using GPGMail