![[Android稳定性] 第015篇 [问题篇] Unable to handle kernel NULL pointer dereference](https://hexoimg.oss-cn-shanghai.aliyuncs.com/blog/25/1/cover_android_stability_015.png)
[Android稳定性] 第015篇 [问题篇] Unable to handle kernel NULL pointer dereference
系统出现死机,初步分析定位到问题为内核空指针引用,具体是在focaltech_spi模块的fts_power_usb_notifier_callback函数中。进一步通过trace32恢复现场发现,问题在于wq对象在函数执行过程中被销毁。根本原因是fts_data->ts_workqueue队列在fts_power_usb_notifier_callback执行过程中被销毁。
![[Android稳定性] 第043篇 [问题篇] Unable to handle kernel NULL pointer dereference at virtual address](https://hexoimg.oss-cn-shanghai.aliyuncs.com/blog/24/11/SEkKvx.png)
[Android稳定性] 第043篇 [问题篇] Unable to handle kernel NULL pointer dereference at virtual address
在测试版本V816.0.24.8.26.UGUCNXM的稳定版挂测中,出现了大量的空指针引用错误。通过离线解析工具分析dump文件,发现问题的核心在于对NULL指针的引用。具体表现为在`mutex_lock`函数中尝试对一个来自`iocb->ki_filp->private_data`的NULL变量加锁,而这个变量是从`struct file`结构体中获取的。进一步检查发现,这与`/proc/hwinfo`节点有关,当尝试读取这个节点时,会导致手机死机。此节点是早期指纹需求所创建,目前已无实际用途,因此解决方案建议移除该节点。