-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fs/mmap: fix mmap returned address #8138
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
Conversation
Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but there is another issue left, maybe look into it at the same?
| entry->vaddr = rdbuffer; | ||
| entry->priv.i = kernel; | ||
| entry->munmap = unmap_rammap; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "rdbuffer" pointer is no longer pointing to the original allocated pointer, when gotoed from lines 215, 245. In the "free" below on lines 253, 257 we should use entry->vaddr, since that stores the original allocated ptr
|
Clarified my original comment, it was too quickly written to be understandable.... |
|
Let me update the commit later. For |
Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
jlaitine
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
|
Let's ignore the unrelated ci broken which is fixed by #8155. |
Summary
mappedpointer in file_mmap_ before returningImpact
No.
Testing
mmap used in gettext now works correctly.