[Bug 2035561] [NEW] [SRU]crash when installing tp-smapi

Launchpad Bug Tracker 2035561 at bugs.launchpad.net
Thu Nov 23 10:53:34 UTC 2023


You have been subscribed to a public bug by Bin Li (binli):

[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/tp-smapi-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.5.0-1008-oem (x86_64)
Consult /var/lib/dkms/tp_smapi/0.43/build/make.log for more information.
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                                                                                             
48380368dec14859723b9e3fbd43e042638d9a76, making it take two parameters                                                                 
instead of one. Pass an explicit 1 as on 6.4+.

 /* Locking: */                                                                                                                         
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)                                                                                        
 static DECLARE_MUTEX(thinkpad_ec_mutex);                                                                                               
-#else                                                                                                                                  
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)                                                                                       
 static DEFINE_SEMAPHORE(thinkpad_ec_mutex);                                                                                            
+#else                                                                                                                                  
+static DEFINE_SEMAPHORE(thinkpad_ec_mutex, 1);                                                                                         
 #endif

** Affects: oem-priority
     Importance: Critical
     Assignee: Bin Li (binli)
         Status: In Progress

** Affects: tp-smapi (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug mantic wayland-session
-- 
[SRU]crash when installing tp-smapi
https://bugs.launchpad.net/bugs/2035561
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.




More information about the Ubuntu-sponsors mailing list