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

Fix pcpui nonsense, esp with sys_exec #51

Closed
brho opened this issue Jul 23, 2018 · 1 comment
Closed

Fix pcpui nonsense, esp with sys_exec #51

brho opened this issue Jul 23, 2018 · 1 comment

Comments

@brho
Copy link
Owner

brho commented Jul 23, 2018

sys_exec, and probably other functions, use pcpui in such as way as to assume they don't block. that clearly isn't the case. this shows up as a bad kfree, where we try to kfree the kernel string for the etherread4 ktask. what happened is the exec started on core 0 (or some core), blocked, and then resumed on another core. when it went to free_sysc_str, it freed the string of whatever was on its old core.

at least two things:

  • make systrace_finish_sysc not take a kth, which cuts down on the number of pcpui uses
  • make sys_exec not cache pcpui.
  • maybe don't cache the pcpui pointer at all, except in careful places. (i think it is a little faster, but not worth the hassle in less performance-critical syscalls).
@brho
Copy link
Owner Author

brho commented Aug 14, 2018

Fixed.

@brho brho closed this as completed Aug 14, 2018
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

No branches or pull requests

1 participant