Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread Greg Kroah-Hartman
On Fri, Aug 17, 2018 at 01:56:35PM +0200, David Hildenbrand wrote: > E.g. When adding the memory block devices, we know that there won't be a > driver to attach to (as there are no drivers for the "memory" subsystem) > - the bus_probe_device() function that takes the device_lock() could > pretty mu

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread David Hildenbrand
On 17.08.2018 13:28, Heiko Carstens wrote: > On Fri, Aug 17, 2018 at 01:04:58PM +0200, David Hildenbrand wrote: If there are no objections, I'll go into that direction. But I'll wait for more comments regarding the general concept first. >>> >>> It is the middle of the merge window, and m

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread Heiko Carstens
On Fri, Aug 17, 2018 at 01:04:58PM +0200, David Hildenbrand wrote: > >> If there are no objections, I'll go into that direction. But I'll wait > >> for more comments regarding the general concept first. > > > > It is the middle of the merge window, and maintainers are really busy > > right now. I

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread David Hildenbrand
On 17.08.2018 12:06, Greg Kroah-Hartman wrote: > On Fri, Aug 17, 2018 at 11:41:24AM +0200, David Hildenbrand wrote: >> On 17.08.2018 11:03, Rafael J. Wysocki wrote: >>> On Fri, Aug 17, 2018 at 10:56 AM David Hildenbrand wrote: On 17.08.2018 10:41, Greg Kroah-Hartman wrote: > On Fri,

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread Greg Kroah-Hartman
On Fri, Aug 17, 2018 at 11:41:24AM +0200, David Hildenbrand wrote: > On 17.08.2018 11:03, Rafael J. Wysocki wrote: > > On Fri, Aug 17, 2018 at 10:56 AM David Hildenbrand wrote: > >> > >> On 17.08.2018 10:41, Greg Kroah-Hartman wrote: > >>> On Fri, Aug 17, 2018 at 09:59:00AM +0200, David Hildenbran

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread David Hildenbrand
On 17.08.2018 11:03, Rafael J. Wysocki wrote: > On Fri, Aug 17, 2018 at 10:56 AM David Hildenbrand wrote: >> >> On 17.08.2018 10:41, Greg Kroah-Hartman wrote: >>> On Fri, Aug 17, 2018 at 09:59:00AM +0200, David Hildenbrand wrote: From: Vitaly Kuznetsov Well require to call add_memo

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread Rafael J. Wysocki
On Fri, Aug 17, 2018 at 10:56 AM David Hildenbrand wrote: > > On 17.08.2018 10:41, Greg Kroah-Hartman wrote: > > On Fri, Aug 17, 2018 at 09:59:00AM +0200, David Hildenbrand wrote: > >> From: Vitaly Kuznetsov > >> > >> Well require to call add_memory()/add_memory_resource() with > >> device_hotplu

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread Rafael J. Wysocki
On Fri, Aug 17, 2018 at 10:41 AM Greg Kroah-Hartman wrote: > > On Fri, Aug 17, 2018 at 09:59:00AM +0200, David Hildenbrand wrote: > > From: Vitaly Kuznetsov > > > > Well require to call add_memory()/add_memory_resource() with > > device_hotplug_lock held, to avoid a lock inversion. Allow external

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread David Hildenbrand
On 17.08.2018 10:41, Greg Kroah-Hartman wrote: > On Fri, Aug 17, 2018 at 09:59:00AM +0200, David Hildenbrand wrote: >> From: Vitaly Kuznetsov >> >> Well require to call add_memory()/add_memory_resource() with >> device_hotplug_lock held, to avoid a lock inversion. Allow external modules >> (e.g. h

Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread Greg Kroah-Hartman
On Fri, Aug 17, 2018 at 09:59:00AM +0200, David Hildenbrand wrote: > From: Vitaly Kuznetsov > > Well require to call add_memory()/add_memory_resource() with > device_hotplug_lock held, to avoid a lock inversion. Allow external modules > (e.g. hv_balloon) that make use of add_memory()/add_memory_r

[PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

2018-08-17 Thread David Hildenbrand
From: Vitaly Kuznetsov Well require to call add_memory()/add_memory_resource() with device_hotplug_lock held, to avoid a lock inversion. Allow external modules (e.g. hv_balloon) that make use of add_memory()/add_memory_resource() to lock device hotplug. Signed-off-by: Vitaly Kuznetsov [modify p