-
Notifications
You must be signed in to change notification settings - Fork 93
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 sb_read and umount cache not be freed #53
Conversation
I defer to @HotMercury for confirmation. |
Hi @RoyWFHuang |
@HotMercury If that, you can go to bpftool/libbpf/ and update it to latest version |
Thank you for your suggestions. I believe your logic in checking is correct, but I am using kmemleak, and it does not show any leak errors.
In my test, there is no error
|
You can test the example in kmodleak, you will see that
The checker will not show "error" or "leak" (like valgrind), it only shows the allocating path (that's the eBpf actually doing) And as your comments, there are 3 leaking in it
Another "11 [] kmem_cache_destroy+0x11c", The problem bothers me, Could you give me you mail that we can discuss this? |
@HotMercury, can you confirm the effectiveness of this proposed change? |
Hi @RoyWFHuang |
You should paste the proposed changes for dedicated discussions. |
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.
Rebase the latest master
branch and validate memory leaks.
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.
Make the git commit messages informative. In particular, mention the way how you figure out the potential leaks.
@RoyWFHuang, can you improve the git commit messages? |
Yes, just wait a few days, I need some time to conclude it. |
1. When the cache be destoryed, we should call rcu_barrier() to prevent call_rcu() still works and this also prevent the cache be reused. 2. After simplefs_destroy_inode_cache() function, we need rcu_barrier() to make sure all memory have be freed.
Thank @RoyWFHuang for contributing! |
Using kmemleak to detect the leak, I found the the command "ls" and "mv" will make the cache leak
here are the leak informations: