Re: [PATCH 1/4] lockdep: lock_set_subclass() fix

From: Peter Zijlstra
Date: Tue Nov 08 2011 - 03:46:36 EST


On Tue, 2011-11-08 at 16:14 +0800, Yong Zhang wrote:
>
> But how do we deal with ->class_cache? Always set it in
> loop_up_lock_class()?

Hrm.. good point, aside from that there's another problem as well, I
think we can deal with the cache being NULL, but is memset() an atomic
write? If not a read could observe an intermediate state and go funny.

I'm tempted to go with the pure kmemcheck_mark_initialized() thing for
now.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/