Updated rusage patch

Bruce Evans brde at optusnet.com.au
Thu May 31 01:11:45 UTC 2007


On Wed, 30 May 2007, Julian Elischer wrote:

> Bruce Evans wrote:
>
>> - RELENG_4: statclock() uses splhigh() but not interrupt atomicity.
>>             exit1() uses no locking and thus races with statclock().
>>   above: statclock() still uses sched_lock but not interrupt atomicity.
>
>
> sched_lock blocks interrupts
>
>>          exit1() uses no locking and thus races with statclock().
             ^^^^^^^^^^^^^^^^^^^^^^^

exit1() uses no locking and is thus unaffected by sched_lock.  More
precisely, it uses mounds of locking, but at the point that it races
with statclock() it holds only PROC_LOCK(p).  It acquires sched_lock
for the first time much later.

Bruce


More information about the freebsd-arch mailing list