mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:28:11 +00:00
Kernel: Fix regression, removing a ProcessGroup that not in the list
I introduced this bug in e95eb7a51
, where it's possible that the
ProcessGroup is created, but we never add it to the list. Make sure we
check that we are in the list before removal. This only broke booting in
self-test mode oddly enough.
Reported-By: Andrew Kaster <andrewdkaster@gmail.com>
This commit is contained in:
parent
cdb93e9307
commit
bbe315d8c0
1 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,9 @@ InlineLinkedList<ProcessGroup>* g_process_groups;
|
|||
ProcessGroup::~ProcessGroup()
|
||||
{
|
||||
ScopedSpinLock lock(g_process_groups_lock);
|
||||
g_process_groups->remove(this);
|
||||
if (m_next || m_prev) {
|
||||
g_process_groups->remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
RefPtr<ProcessGroup> ProcessGroup::create(ProcessGroupID pgid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue