kernel - MPSAFE work - fix bugs in recent MPSAFE work.