Sanity check

This commit is contained in:
apio 2022-10-12 18:38:18 +02:00
parent d4c4c0177d
commit 1a54342454

View File

@ -130,12 +130,7 @@ void Scheduler::load_user_task(const char* filename)
ELFImage* image = ELFLoader::load_elf_from_filesystem( ELFImage* image = ELFLoader::load_elf_from_filesystem(
filename); // FIXME: TOCTOU? Right now, impossible, since interrupts are disabled and SMP is not a thing. But in filename); // FIXME: TOCTOU? Right now, impossible, since interrupts are disabled and SMP is not a thing. But in
// the future, it might be possible. // the future, it might be possible.
if (!image) ASSERT(image);
{
kerrorln("Failed to load %s from initrd", filename);
delete new_task;
return;
}
new_task->user_task = true; new_task->user_task = true;
new_task->regs.rip = image->entry; new_task->regs.rip = image->entry;
new_task->image = image; new_task->image = image;