回合 53de3b080d5e ("evm: Check also if *tfm is an error pointer in init_desc()")
,以及其后续修补补丁:843385694721 ("evm: Fix a small race in init_desc()")
。
53de3b080d5e ("evm: Check also if *tfm is an error pointer in init_desc()")
Task A | Task B
*tfm = crypto_alloc_shash() /* error pointer */ |
| if (*tfm == NULL) // *tfm is not NULL, use it
| rc = crypto_shash_init(desc) // panic
*tfm = NULL |
IS_ERR_OR_NULL(*tfm)
替代 *tfm == NULL
。843385694721 ("evm: Fix a small race in init_desc()")
IS_ERR_OR_NULL()
也会出现竞争状态:其内部会针对 error pointer 和 NULL 做两次判断,而竞争状态可能出现在两次判断之间。Hi raverstern, 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: @Xie XiuQi , @YangYingliang , @成坚 (CHENG Jian) , @jiaoff , @AlexGuo , @hanjun-guo , @woqidaideshi , @zhengzengkai , @Jackie Liu , @Zhang Yi , @colyli , @ThunderTown , @htforge , @Chiqijun , @冷嘲啊 , @zhujianwei001 , @kylin-mayukun , @wangxiongfeng , @Kefeng , @SuperSix173 , @WangShaoBo , @Zheng Zucheng , @陈结松 , @刘恺 , @whoisxxx , @wuxu_buque , @koulihong , @柳歆 , @朱科潜 , @Xu Kuohai , @Lingmingqiang , @juntian , @OSSIM , @郑振鹏 , @刘勇强 , @yuzenghui , @Qiuuuuu , @xiehaocheng , @chen wei , @CTC-Xibo.Wang , @Jason Zeng , @Yuehaibing , @guzitao , @zhanghongchen , @lujialin , @苟浩 , @georgeguo , @毛泓博 , @AllenShi , @DuanqiangWen
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论