[openib-general] Re: [PATCH 2 of 20] ipath - core device driver

Roland Dreier rdreier at cisco.com
Thu Mar 9 15:22:22 PST 2006


 > +	if (dd->ipath_unit >= atomic_read(&ipath_max))
 > +		atomic_set(&ipath_max, dd->ipath_unit + 1);

If this is the way you use ipath_max, why is it an atomic variable?  I
can't find any uses of ipath_max that don't look racy if the only
thing protecting it is the fact that it's an atomic_t, and if it has
some other protection, then I don't think it needs to be atomic.

 - R.



More information about the general mailing list