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

Kernel: Fix writes to ProcFS #6879

Merged
merged 1 commit into from
May 5, 2021

Conversation

SpencerCDixon
Copy link
Contributor

@SpencerCDixon SpencerCDixon commented May 5, 2021

When using sysctl you can enable/disable values by writing to the
ProcFS. Some drift must of occured where writing was failing due to a
missing set_mtime call. Whenever one write's a file the modified time
(mtime) will be updated so we need to implement this interface in ProcFS.

Copy link
Collaborator

@awesomekling awesomekling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! The fix looks good, but the commit message is slightly inaccurate. set_mtime is called on write, but not on open :)

When using `sysctl` you can enable/disable values by writing to the
ProcFS. Some drift must of occured where writing was failing due to a
missing `set_mtime` call. Whenever one `write`'s a file the modified time
(mtime) will be updated so we need to implement this interface in
ProcFS.
@SpencerCDixon
Copy link
Contributor Author

Whoops good to know! Some reason thought that the open also modified it as if it was being touched. Updated comment to be explicit about write only

@awesomekling awesomekling changed the title Fix writes to ProcFS Kernel: Fix writes to ProcFS May 5, 2021
@awesomekling awesomekling merged commit 2156c72 into SerenityOS:master May 5, 2021
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

Successfully merging this pull request may close these issues.

2 participants