wake-0 / fhvOS

This repository contains an os for the arm cortex a8 in combination with beaglebone.
GNU General Public License v2.0
7 stars 1 forks source link

[MemManager] Possible bug in permission faults of MMU #111

Open trylimits opened 8 years ago

trylimits commented 8 years ago

In the MMU implementation we handle permission faults by killing the current process. However, we do not explicitly run the next process which may lead to an inconsistent behavior of the OS. In cases of a NPE we have implemented the explicit switch to the next process, so I suggest we should also implement it this way if a permission fault occurs. Concretly, we should call SchedulerRunNextProcess(context) after killing the current process.

See line 208 and 211 in mmu.c, i.e. FIRST_LEVEL_PERMISSION_FAULT and FIRST_LEVEL_PERMISSION_FAULT.

wake-0 commented 8 years ago

I think you are right and the code should be corrected.