构造场景令维测打印/proc/sharepool/proc_stat和加入新组并发,可以发现如下ABBA死锁。
There is a ABBA deadlock in the process of sp_group_add_task and
proc_stat_show().
PROCESS A:
sp_group_add_task() acquire sp_group_sem write lock
->sp_init_proc_stat() acquire sp_spg_stat_sem write lock
PROCESS B:
proc_stat_show() acquire sp_spg_stat_sem read lock
->idr_proc_stat_cb() acquire sp_group_sem read lock
Here we choose the simplest way that acquires sp_group_sem and
sp_stat_sem read lock subsequently in proc_stat_show(), since it just
has effect on the process of debug feature.
测试步骤:
测试现象:
出现死锁
Hi guo-mengqi, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @pi3orama , @成坚 (CHENG Jian) , @jiaoff , @Qiuuuuu , @zhengzengkai , @刘勇强 , @Xie XiuQi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
受影响版本排查(受影响/不受影响):
1.openEuler-22.03-LTS(5.10.0):受影响
2.openEuler-20.03-LTS-SP1(4.19.90):受影响
3.openEuler-20.03-LTS-SP2(4.19.90):受影响
4.openEuler-20.03-LTS-SP3(4.19.194):受影响
修复是否涉及abi变化(是/否):
1.openEuler-22.03-LTS(5.10.0):否
2.openEuler-20.03-LTS-SP1(4.19.90):否
3.openEuler-20.03-LTS-SP2(4.19.90):否
4.openEuler-20.03-LTS-SP3(4.19.194):否
登录 后才可以发表评论