[SRU]crash when installing tp-smapi
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OEM Priority Project |
Triaged
|
Critical
|
Bin Li | ||
tp-smapi (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
[Impact]
tp-smapi-dkms is a kernel module exposes some features of the ThinkPad
hardware/firmware via a sysfs interface. It will crash after 6.4 kernel.
In OEM projects, we met this issue on 6.5.0-oem kernel. And it blocks our
QA team to install hdapsd, because it's in "Recommends: tp-smapi-dkms".
[Test case]
On 22.04, just run below command.
$ sudo apt install tp-smapi-dkms
Loading new tp_smapi-0.43 DKMS files...
Building for 6.5.0-1008-oem
Building initial module for 6.5.0-1008-oem
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/
Error! Bad return status for module build on kernel: 6.5.0-1008-oem (x86_64)
Consult /var/lib/
dpkg: error processing package tp-smapi-dkms (--configure):
installed tp-smapi-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
tp-smapi-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
[Potential regression]
It's low risk, cherry-pick from uptream, it uses KERNEL_VERSION MACRO to support 6.4+ kernel.
Linux changed the DEFINE_SEMAPHORE macro in
48380368dec1485
instead of one. Pass an explicit 1 as on 6.4+.
/* Locking: */
#if LINUX_VERSION_CODE < KERNEL_
static DECLARE_
-#else
+#elif LINUX_VERSION_CODE < KERNEL_
static DEFINE_
+#else
+static DEFINE_
#endif
tags: | added: oem-priority |
tp-smapi- dkms.0. crash