-
Notifications
You must be signed in to change notification settings - Fork 250
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 lxcfs read null #640
Fix lxcfs read null #640
Conversation
@mihalicyn can you review this one please? |
Thanks for your PR! Please, can you explain how this is connected with #599 ? Why have you mentioned this issue? |
I made a mistake linking that issue. I meant to link this issue instead. I will go ahead and fix that. Sorry for the confusion. |
I change lxcfs_read because that was the only function specified. I did not want to change other functions that were not in the scope of the issue |
Ah, so, this PR is an attempt to fix #635? |
You need to squash all (3) commits into one then (https://docs.github.com/en/get-started/using-git/about-git-rebase). It is a good practice to have one commit per logical change. But in your case you have two commits (7117464 and 1b8d493) which do the opposite thing (first - introduces a wrong change and second reverts it). This is not something we want. ;-) |
In general, I can't see how this change can fix issue in #635, because in there we have a pretty-pretty weird stack. It looks like something is terribly wrong with the dynamic symbol resolution. It is not the same bug as we had with |
3a1c115
to
2817fe4
Compare
Just squashed the commits. |
src/lxcfs.c
Outdated
|
||
if (cgroup_is_enabled && strncmp(path, "/cgroup", 7) == 0) { | ||
if (LXCFS_TYPE_CGROUP(type)) { |
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.
cgroup_is_enabled && LXCFS_TYPE_CGROUP(type)
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.
Added change
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.
small nit
Please, edit commit message:
using |
2817fe4
to
0cb15be
Compare
Thank you! Just changed the previous commit message to one sign-off and fixed the cgroup_is_enabled issue. |
I went ahead and added the checks to FUSE file system calls except open/opendir. Should we find a way to create a safe macro for the non-FUSE calls too? Update: I just realized that those would may not have an equivalent macro because the macro relies on file type info. |
Should I squash the latest commits to close this issue? |
Yeah, a single clean commit would be good I think. |
1f64e98
to
96c00ed
Compare
Should I resolve the change requested from above? |
@mihalicyn Did I correctly address your desired changes? I think the merge is still blocked because of the review request on May 3. |
Hey @DevonSchwartz sorry for a long delay with the reply. Yeah, now it looks good. For some reason GitHub runners get stuck to test this one. I guess you need to do something like |
Signed-off-by: Devon Schwartz <[email protected]>
96c00ed
to
bcb1b0a
Compare
Thanks @mihalicyn . Just made the push |
Thanks! |
After lxc#640 was merged we've got the entire procfs subtree unavailable. Fixes: lxc#640 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
We used the macros that were implemented for lxcfs_release() to fix the NULL path issue. This will replace the existing strcmp solution.
These macros have already been merged into the main branch to resolve the lxcfs_release() issue.
fix #635