Dynamic reads without locking.

Bruce M Simpson bms at spc.org
Wed Oct 8 03:15:35 PDT 2003


On Wed, Oct 08, 2003 at 12:12:22PM +0200, Pawel Jakub Dawidek wrote:
> But I'm not talking about non-atomic reads. What I'm want to show is that
> even atomic read (without lock) is dangerous in some cases.
> 
> +> If you don't care about occasionally reading false data (for statistics or
> +> such stuff) you can go without the lock.
> 
> I'm afraid that many developers thinks that atomic reads are always safe
> without locks (there are many such reads in sources). I hope I'm wrong.

Correcto. A while back peter@ and I discussed this. If you can think of
such places, share what you've found, and let's discuss fixing the offending
code so as to avoid nasty races.

BMS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 167 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20031008/810e1c93/attachment.bin


More information about the freebsd-hackers mailing list