]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf6a7d4d982706df372f7f6d34604006ca6f10c82
treede5e85f413d4c0a5eadf0dd9e2251abbd74c2b01
parente7b1c9fa1489ca005fe023c7df43158dd980bed4
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