Bug 4043 - [ANCK 5.10] nand 设备驱动中存在double free问题
Summary: [ANCK 5.10] nand 设备驱动中存在double free问题
Status: RESOLVED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-11 16:38 UTC by songkai
Modified: 2023-02-28 19:37 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description songkai inspur_group 2023-02-11 16:38:08 UTC
Description of problem:

meson_nand.c文件中的meson_nfc_nand_chip_cleanup函数中调用了如下2个函数:
             meson_nfc_free_buffer(&meson_chip->nand);
             nand_cleanup(&meson_chip->nand);

其中nand_cleanup的函数调用链如下:
             nand_cleanup --->>> nand_detach --->>> meson_nand_detach_chip 
                        --->>> meson_nfc_free_buffer

此调用链中的函数调用与meson_nfc_nand_chip_cleanup函数中的meson_nfc_free_buffer重复,会造成double free 问题。

upstream b0e82f95fded729dc63336819cd0ba43d250612f 已经解决了此问题
Comment 1 maqiao alibaba_cloud_group 2023-02-28 19:37:14 UTC
merged: https://gitee.com/anolis/cloud-kernel/pulls/1174