Re: [PATCH -v2] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Greg Kroah-Hartman
On Tue, Mar 12, 2013 at 05:21:19PM +0100, Michal Hocko wrote: > On Tue 12-03-13 06:34:46, Greg Kroah-Hartman wrote: > > On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: > > > The fix is quite simple. We can pull the key inside bus_type structure > > > because they are defined per

[PATCH -v2] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Michal Hocko
On Tue 12-03-13 06:34:46, Greg Kroah-Hartman wrote: > On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: > > The fix is quite simple. We can pull the key inside bus_type structure > > because they are defined per device so the pointer will be unique as > > well. bus_register doesn't

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Greg Kroah-Hartman
On Tue, Mar 12, 2013 at 05:09:38PM +0100, Peter Zijlstra wrote: > 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

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Michal Hocko
On Tue 12-03-13 16:28:25, 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

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Peter Zijlstra
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; > > > > > >

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Greg Kroah-Hartman
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; > > };

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Peter Zijlstra
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

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Greg Kroah-Hartman
On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: > The fix is quite simple. We can pull the key inside bus_type structure > because they are defined per device so the pointer will be unique as > well. bus_register doesn't need to be a macro anymore so change it > to the inline. We

[PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Michal Hocko
[CCing Greg and Kay] On Tue 12-03-13 12:07:50, Michal Hocko wrote: > [Let's CC Ingo and Peter] > > On Tue 12-03-13 11:15:55, Michal Hocko wrote: > > On Tue 12-03-13 14:36:46, Li Zefan wrote: > > > Seems a new bug in 3.9 kernel? > > > > > > > > > [ 207.271924]

Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Michal Hocko
[Let's CC Ingo and Peter] On Tue 12-03-13 11:15:55, Michal Hocko wrote: > On Tue 12-03-13 14:36:46, Li Zefan wrote: > > Seems a new bug in 3.9 kernel? > > > > > > [ 207.271924] == > > [ 207.271932] [ INFO: possible circular locking

Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Michal Hocko
On Tue 12-03-13 14:36:46, Li Zefan wrote: > Seems a new bug in 3.9 kernel? > > > [ 207.271924] == > [ 207.271932] [ INFO: possible circular locking dependency detected ] > [ 207.271942] 3.9.0-rc1-0.7-default+ #34 Not tainted > [ 207.271948]

Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Li Zefan
On 2013/3/12 16:32, Hillf Danton wrote: > On Tue, Mar 12, 2013 at 2:36 PM, Li Zefan wrote: >> Seems a new bug in 3.9 kernel? >> > Bogus info, perhaps. > No matter it's a real bug or it's false positive, we need to make lockdep happy. -- To unsubscribe from this list: send the line "unsubscribe

Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Hillf Danton
On Tue, Mar 12, 2013 at 2:36 PM, Li Zefan wrote: > Seems a new bug in 3.9 kernel? > Bogus info, perhaps. > > [ 207.271924] == > [ 207.271932] [ INFO: possible circular locking dependency detected ] > [ 207.271942] 3.9.0-rc1-0.7-default+ #34

[BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Li Zefan
Seems a new bug in 3.9 kernel? [ 207.271924] == [ 207.271932] [ INFO: possible circular locking dependency detected ] [ 207.271942] 3.9.0-rc1-0.7-default+ #34 Not tainted [ 207.271948] ---

[BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Li Zefan
Seems a new bug in 3.9 kernel? [ 207.271924] == [ 207.271932] [ INFO: possible circular locking dependency detected ] [ 207.271942] 3.9.0-rc1-0.7-default+ #34 Not tainted [ 207.271948] ---

Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Hillf Danton
On Tue, Mar 12, 2013 at 2:36 PM, Li Zefan lize...@huawei.com wrote: Seems a new bug in 3.9 kernel? Bogus info, perhaps. [ 207.271924] == [ 207.271932] [ INFO: possible circular locking dependency detected ] [ 207.271942]

Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Li Zefan
On 2013/3/12 16:32, Hillf Danton wrote: On Tue, Mar 12, 2013 at 2:36 PM, Li Zefan lize...@huawei.com wrote: Seems a new bug in 3.9 kernel? Bogus info, perhaps. No matter it's a real bug or it's false positive, we need to make lockdep happy. -- To unsubscribe from this list: send the line

Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Michal Hocko
On Tue 12-03-13 14:36:46, Li Zefan wrote: Seems a new bug in 3.9 kernel? [ 207.271924] == [ 207.271932] [ INFO: possible circular locking dependency detected ] [ 207.271942] 3.9.0-rc1-0.7-default+ #34 Not tainted [ 207.271948]

Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)

2013-03-12 Thread Michal Hocko
[Let's CC Ingo and Peter] On Tue 12-03-13 11:15:55, Michal Hocko wrote: On Tue 12-03-13 14:36:46, Li Zefan wrote: Seems a new bug in 3.9 kernel? [ 207.271924] == [ 207.271932] [ INFO: possible circular locking dependency detected

[PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Michal Hocko
[CCing Greg and Kay] On Tue 12-03-13 12:07:50, Michal Hocko wrote: [Let's CC Ingo and Peter] On Tue 12-03-13 11:15:55, Michal Hocko wrote: On Tue 12-03-13 14:36:46, Li Zefan wrote: Seems a new bug in 3.9 kernel? [ 207.271924]

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Greg Kroah-Hartman
On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: The fix is quite simple. We can pull the key inside bus_type structure because they are defined per device so the pointer will be unique as well. bus_register doesn't need to be a macro anymore so change it to the inline. We could

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Peter Zijlstra
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

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Greg Kroah-Hartman
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

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Peter Zijlstra
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

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Michal Hocko
On Tue 12-03-13 16:28:25, 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

Re: [PATCH] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Greg Kroah-Hartman
On Tue, Mar 12, 2013 at 05:09:38PM +0100, Peter Zijlstra wrote: 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 {

[PATCH -v2] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Michal Hocko
On Tue 12-03-13 06:34:46, Greg Kroah-Hartman wrote: On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: The fix is quite simple. We can pull the key inside bus_type structure because they are defined per device so the pointer will be unique as well. bus_register doesn't need to be

Re: [PATCH -v2] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved))

2013-03-12 Thread Greg Kroah-Hartman
On Tue, Mar 12, 2013 at 05:21:19PM +0100, Michal Hocko wrote: On Tue 12-03-13 06:34:46, Greg Kroah-Hartman wrote: On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: The fix is quite simple. We can pull the key inside bus_type structure because they are defined per device so the