lkml.org 
[lkml]   [2015]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] driver core: export lock_device_hotplug/unlock_device_hotplug
Date
"Rafael J. Wysocki" <rjw@rjwysocki.net> writes:

> On Wednesday, February 11, 2015 12:39:47 PM Andrew Morton wrote:
>> On Wed, 11 Feb 2015 16:44:20 +0100 Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>>
>> > add_memory() is supposed to be run with device_hotplug_lock grabbed, otherwise
>> > it can race with e.g. device_online(). Allow external modules (hv_balloon for
>> > now) to lock device hotplug.
>> >
>> > ...
>> >
>> > --- a/drivers/base/core.c
>> > +++ b/drivers/base/core.c
>> > @@ -55,11 +55,13 @@ void lock_device_hotplug(void)
>> > {
>> > mutex_lock(&device_hotplug_lock);
>> > }
>> > +EXPORT_SYMBOL_GPL(lock_device_hotplug);
>> >
>> > void unlock_device_hotplug(void)
>> > {
>> > mutex_unlock(&device_hotplug_lock);
>> > }
>> > +EXPORT_SYMBOL_GPL(unlock_device_hotplug);
>> >
>> > int lock_device_hotplug_sysfs(void)
>> > {
>>
>> It's kinda crazy that lock_device_hotplug_sysfs() didn't get any
>> documentation. I suggest adding this while you're in there:
>>
>>
>> --- a/drivers/base/core.c~a
>> +++ a/drivers/base/core.c
>> @@ -61,6 +61,9 @@ void unlock_device_hotplug(void)
>> mutex_unlock(&device_hotplug_lock);
>> }
>>
>> +/*
>> + * "git show 5e33bc4165f3ed" for details
>> + */
>> int lock_device_hotplug_sysfs(void)
>> {
>> if (mutex_trylock(&device_hotplug_lock))
>>
>> which is a bit lazy but whatev.
>>
>> I'll assume that Greg (or Rafael?) will be processing this patchset.
>
> Well, I would do that if I saw it (my address in the CC has been deprecated
> for several months now).
>
> Vitaly, can you please resend with a CC to a valid address of mine,
> please?

Yes, sure, for some reason you were not on the get_maintainer.pl output.

>
> Rafael

--
Vitaly


\
 
 \ /
  Last update: 2015-02-12 11:21    [W:0.555 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site