lkml.org 
[lkml]   [2009]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [KVM PATCH v3 3/3] KVM: Fix races in irqfd using new eventfd_kref_get interface
On Mon, Jun 22, 2009 at 11:11:12AM -0700, Davide Libenzi wrote:
> On Mon, 22 Jun 2009, Michael S. Tsirkin wrote:
>
> > Not really, it's impossible to document all races one have thought
> > about and avoided.
>
> Well, when some new code has non-trivial locking/racing logics, you better
> document it as clearly as possible, akpm announced time ago.

Absolutely. But IMO documentation in the form of "fields A B C are
protected by lock X" in a single place near field declaration is better
than "we take lock X here to protect against race with user thread using
fields A B C" sprinkled all over the code.




\
 
 \ /
  Last update: 2009-06-22 20:35    [W:0.320 / U:0.392 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site