]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: dell-wmi-sysman: Make populate_foo_data functions more robust
authorPrasanth KSR <prasanth.ksr@dell.com>
Wed, 12 May 2021 10:25:30 +0000 (15:55 +0530)
committerHans de Goede <hdegoede@redhat.com>
Wed, 16 Jun 2021 15:47:48 +0000 (17:47 +0200)
commitf52783c154f8a8e2721f8dd6ab6c617dd73dce2b
tree341cea421c2e539b3dac675c4ec08dd473e73ae6
parent70cbf5cd52e65b9e7ea198f97a0465a1d703a656
platform/x86: dell-wmi-sysman: Make populate_foo_data functions more robust

1. Check acpi type before assignment of each property value

2. Add boundary check for properties count

Co-developed-by: Divya Bharathi <divya.bharathi@dell.com>
Signed-off-by: Divya Bharathi <divya.bharathi@dell.com>
Signed-off-by: Prasanth KSR <prasanth.ksr@dell.com>
Link: https://lore.kernel.org/r/20210512102530.9704-1-prasanth.ksr@dell.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/dell/dell-wmi-sysman/dell-wmi-sysman.h
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c
drivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c
drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c