Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset ac9e79d in mainline


Ignore:
Timestamp:
2018-11-06T19:52:51Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
b294126
Parents:
4a8d0dd1
Message:

Fix as_t reference counting

Commit 78de83de52a9115dc77b09bb7029403dad8c2fb0 changed the way how
reference counting works for newly created objects, but didn't remove
the explicit bumping of reference count for address spaces, which had
been necessary before that. Because of that, as_t structures were never
deallocated.

Location:
kernel/generic/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/as.c

    r4a8d0dd1 rac9e79d  
    137137        if (!AS_KERNEL)
    138138                panic("Cannot create kernel address space.");
    139 
    140         /*
    141          * Make sure the kernel address space
    142          * reference count never drops to zero.
    143          */
    144         as_hold(AS_KERNEL);
    145139}
    146140
  • kernel/generic/src/proc/task.c

    r4a8d0dd1 rac9e79d  
    252252        futex_task_init(task);
    253253
    254         /*
    255          * Get a reference to the address space.
    256          */
    257         as_hold(task->as);
    258 
    259254        irq_spinlock_lock(&tasks_lock, true);
    260255
Note: See TracChangeset for help on using the changeset viewer.