summaryrefslogtreecommitdiff
path: root/include/linux/device-id/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorMingyou Chen <qby140326@gmail.com>2026-07-01 20:01:39 +0800
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-07-03 16:32:41 +0300
commitd3666875c75eb1bc8090343fa0d6fc8fb7924356 (patch)
tree8e010b40a1d57d181af0d78cc910ae0fbdde7368 /include/linux/device-id/git@git.tavy.me:linux-stable.git
parenta0738abd042f7406edd2175a819cf2e66388ed97 (diff)
platform/x86: bitland-mifs-wmi: Fix NULL pointer dereference during suspend/resume
The driver registers two distinct WMI devices: a control device (BITLAND_WMI_CONTROL) and an event device (BITLAND_WMI_EVENT). During the probe phase, the event device handling path returns early before initializing the platform profile device (data->pp_dev), leaving it NULL. However, the PM sleep operations are registered globally for the WMI driver and are triggered for both devices. When entering suspend, the event device invokes bitland_mifs_wmi_suspend(), which passes the uninitialized data->pp_dev (NULL) into laptop_profile_get(). This leads to a NULL pointer dereference inside dev_get_drvdata(), causing a kernel Oops and halting the suspend sequence. Fix this by adding a validity check for data->pp_dev in both the suspend and resume callbacks, safely skipping profile operations for the event device. Fixes: dc1ec4fa86b2 ("platform/x86: bitland-mifs-wmi: Add new Bitland MIFS WMI driver") Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Mingyou Chen <qby140326@gmail.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20260701120140.430659-1-qby140326@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'include/linux/device-id/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions