On Tue, 2013-03-12 at 08:43 -0700, Greg Kroah-Hartman wrote: > On Tue, Mar 12, 2013 at 04:28:25PM +0100, Peter Zijlstra wrote: > > On Tue, 2013-03-12 at 14:05 +0100, Michal Hocko wrote: > > > @@ -111,17 +111,17 @@ struct bus_type { > > > struct iommu_ops *iommu_ops; > > > > > > struct subsys_private *p; > > > + struct lock_class_key __key; > > > }; > > > > Is struct bus_type constrained to static storage or can people go an > > allocate this stuff dynamically? If so, this patch is broken. > > I don't think anyone is creating this dynamically, it should be static. > Why does this matter, does the lockdep code care about where the > variable is declared (heap vs. static)? Yeah, lockdep needs keys to be in static storage since its data structures are append-only. Dynamic stuff would require being able to remove everything related to a key so that we can re-purpose it for the next allocation etc. Lockdep will in fact warn (and disable itself) if you try and feed it dynamic addresses, so using it like this will effectively check your bus_type static storage 'requirement'. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>