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

bug?: kfree the same page twice #191

Open
qin-you opened this issue Jul 6, 2023 · 0 comments
Open

bug?: kfree the same page twice #191

qin-you opened this issue Jul 6, 2023 · 0 comments

Comments

@qin-you
Copy link

qin-you commented Jul 6, 2023

in kernel/proc.c freeproc() function :

kfree((void*)p->trapframe);                                  // first
proc_freepagetable(p->pagetable, p->sz);
         uvmunmap(pagetable, TRAPFRAME, 1, 0);
                     kfree((void*)pa);                                // second

kfree will not give up this duplicated page, and this could lead to some problems. I delete the first kfree above and the code works well.

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

No branches or pull requests

1 participant