brho / akaros

Akaros Operating System
http://akaros.cs.berkeley.edu/
Other
314 stars 61 forks source link

Fix pcpui nonsense, esp with sys_exec #51

Closed brho closed 6 years ago

brho commented 6 years ago

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:

brho commented 6 years ago

Fixed.