Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: 修复因rsdp v1 v2版本问题,导致ACPI无法正常初始化的bug #454

Merged
merged 8 commits into from
Nov 23, 2023

Conversation

Jomocool
Copy link
Collaborator

No description provided.

@fslongjin fslongjin requested a review from YJwu2023 November 22, 2023 04:18
let rsdp_paddr1 = Self::rsdp_paddr(rsdp_vaddr1);
let res1 = unsafe { acpi::AcpiTables::from_rsdp(AcpiHandlerImpl, rsdp_paddr1.data()) };
let rsdp_paddr2 = Self::rsdp_paddr(rsdp_vaddr2);
let res2 = unsafe { acpi::AcpiTables::from_rsdp(AcpiHandlerImpl, rsdp_paddr2.data()) };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样是有问题的,当77行之后,75行获取的内存就已经释放了。这是一个典型的use after free的错误。

@fslongjin fslongjin changed the title Acpi bugfix: 修复因rsdp v1 v2版本问题,导致ACPI无法正常初始化的bug Nov 23, 2023
@fslongjin fslongjin merged commit cc5feaf into DragonOS-Community:master Nov 23, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants