-
Notifications
You must be signed in to change notification settings - Fork 39
Fix: size_fd has to be read under a lock #643
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
Fix: size_fd has to be read under a lock #643
Conversation
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.
👍
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.
That's a misleading commit message :) fd_size
needs to be read under a lock, not fd_offset
(a stack variable) set under one.
@@ -637,7 +637,8 @@ static inline void assert_is_page_aligned(uintptr_t ptr, size_t page_size) { | |||
static int os_mmap_aligned(void *hint_addr, size_t length, size_t alignment, |
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.
NIT: 12th argument to this function. This screams for refactor.
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.
Yes, I will do that in a separate PR.
Signed-off-by: Lukasz Dorau <[email protected]>
b4eaf0e
to
09c089a
Compare
Fixed. |
Description
size_fd
has to be read under a lock.Checklist