wmi: Free the allocated acpi objects through wmi_get_event_data
Subsystems (2)
PATCH RESEND 1/1 wmi: Free the allocated acpi objects through wmi_get_event_data
These function allocate an acpi object by calling wmi_get_event_data, which then calls acpi_evaluate_object, and it is not freed afterwards.
And kernel doc is fixed for parameters of wmi_get_event_data.
Signed-off-by Anisse Astier <[email protected]>
Acked-by Matthew Garrett <[email protected]>
Acked-by Randy Dunlap <[email protected]>
---
Hi,
I didn't see this patch merged in any tree yet, so I'm resending it with the added acked-bys.
Regards,
Anisse
drivers/platform/x86/dell-wmi.c | 1 + drivers/platform/x86/hp-wmi.c | 2 ++ drivers/platform/x86/wmi.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-)
drivers/platform/x86/dell-wmi.c +1 -0
@@ -180,6 +180,7 @@ static void dell_wmi_notify(u32 value, void *context)printk (KERN_INFO "dell-wmi: Unknown key %x pressed\n" , buffer[1 ] &0xFFFF ); } +kfree (obj); }static int __init dell_wmi_input_setup (void )
drivers/platform/x86/hp-wmi.c +2 -0
@@ -377,6 +377,8 @@ static void hp_wmi_notify(u32 value, void *context) eventcode); }else printk (KERN_INFO "HP WMI: Unknown response received\n" ); + +kfree (obj); }static int __init hp_wmi_input_setup (void )
drivers/platform/x86/wmi.c +2 -2
@@ -510,8 +510,8 @@ EXPORT_SYMBOL_GPL(wmi_remove_notify_handler);/** * wmi_get_event_data - Get WMI data associated with an event * -* @event - Event to find -* &out - Buffer to hold event data +* @event: Event to find +* @out: Buffer to hold event data. out->pointer should be freed with kfree() * * Returns extra data associated with an event in WMI. */
Signature · 1 line
1.6.5.3
Quoted 8 lines · On Tuesday 15 December 2009 09:50:24 Anisse Astier wrote:
These function allocate an acpi object by calling
wmi_get_event_data, which then callsacpi_evaluate_object, and it is not freed afterwards.And kernel doc is fixed for parameters of
wmi_get_event_data.Signed-off-by Anisse Astier <[email protected]>Acked-by Matthew Garrett <[email protected]>Acked-by Randy Dunlap <[email protected]>
For the wmi.c changes:
Acked-by Carlos Corbacho <[email protected]>
Len, can you just take this directly?
-Carlos
Signature · 3 lines
E-Mail: [email protected] Web: strangeworlds.co.uk GPG Key ID: 0x23EE722D
applied
thanks,
Len Brown, Intel Open Source Technology Center