diff options
| author | Hans de Goede <[email protected]> | 2024-10-05 13:05:45 +0000 |
|---|---|---|
| committer | Hans de Goede <[email protected]> | 2024-10-06 10:50:50 +0000 |
| commit | 2fae3129c0c08e72b1fe93e61fd8fd203252094a (patch) | |
| tree | d2f0504ee56ea39eb763a8ff2316a5afc256b6a3 /drivers/gpu/drm/omapdrm/omap_fbdev.c | |
| parent | platform/x86: wmi: Update WMI driver API documentation (diff) | |
| download | kernel-2fae3129c0c08e72b1fe93e61fd8fd203252094a.tar.gz kernel-2fae3129c0c08e72b1fe93e61fd8fd203252094a.zip | |
platform/x86: x86-android-tablets: Fix use after free on platform_device_register() errors
x86_android_tablet_remove() frees the pdevs[] array, so it should not
be used after calling x86_android_tablet_remove().
When platform_device_register() fails, store the pdevs[x] PTR_ERR() value
into the local ret variable before calling x86_android_tablet_remove()
to avoid using pdevs[] after it has been freed.
Fixes: 5eba0141206e ("platform/x86: x86-android-tablets: Add support for instantiating platform-devs")
Fixes: e2200d3f26da ("platform/x86: x86-android-tablets: Add gpio_keys support to x86_android_tablet_init()")
Cc: [email protected]
Reported-by: Aleksandr Burakov <[email protected]>
Closes: https://lore.kernel.org/platform-driver-x86/[email protected]/
Signed-off-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fbdev.c')
0 files changed, 0 insertions, 0 deletions
