dell-wmi: Stop storing pointers to DMI tables
authorAndy Lutomirski <luto@kernel.org>
Mon, 15 Feb 2016 16:32:33 +0000 (08:32 -0800)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 23 Mar 2016 17:05:44 +0000 (10:05 -0700)
commit18b6f80f5095036bd2204c54c89a5a0f5a785e3d
treede5e85f413d4c0a5eadf0dd9e2251abbd74c2b01
parent0c41a08e131d753af48ae6f052aed8d530b9c976
dell-wmi: Stop storing pointers to DMI tables

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>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/dell-wmi.c