lkml.org 
[lkml]   [2016]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] dell-wmi: Stop storing pointers to DMI tables
Hi Andy,

On Mon, 18 Jan 2016 12:59:38 -0800, Andy Lutomirski wrote:
> The dmi_walk function maps the DMI table, walks it, and unmaps it.
> This means that the dell_bios_hotkey_table that find_hk_type stores
> points to unmapped memory by the time it gets read.
>
> I've been able to trigger crashes caused by the stale pointer a
> couple of times, but never on a stock kernel.
>
> Fix it by generating the keymap in the dmi_walk callback instead of
> storing a pointer.
>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
>
> Notes:
> Changes from v1:
> - Rename handle_dmi_table to handle_dmi_entry (Jean)
> - Remove useless assignment to results->err (Jean)
>
> drivers/platform/x86/dell-wmi.c | 68 +++++++++++++++++++++++++----------------
> 1 file changed, 41 insertions(+), 27 deletions(-)
> (...)
> @@ -431,7 +446,6 @@ static int __init dell_wmi_init(void)
> return -ENODEV;
> }
>
> - dmi_walk(find_hk_type, NULL);
>

Please also delete the following blank line, to avoid two consecutive
blank lines.

> err = dell_wmi_input_setup();
> if (err)

Other than this, it looks good to me, so after fixing the above, you
can add:

Reviewed-by: Jean Delvare <jdelvare@suse.de>

--
Jean Delvare
SUSE L3 Support

\
 
 \ /
  Last update: 2016-01-19 10:21    [W:1.946 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site