nanovms / nanos

A kernel designed to run one and only one application in a virtualized environment
https://nanos.org
Apache License 2.0
2.58k stars 133 forks source link

timm_dealloc(): fix handling of tuples that reference `timm_oom` #2018

Closed francescolavra closed 4 months ago

francescolavra commented 4 months ago

A given status tuple may contain another status tuple as value for one of its attributes (e.g. when a status tuple is generated via a call to timm_up()), and the inner tuple can be an arbitrary tuple, including timm_oom (i.e. the global tuple that is allocated during kernel initialization and is used to indicate out-of-memory conditions). The timm_oom tuple must never be deallocated, but the existing code deallocates it if it is the value for an attribute of an outer status tuple. This change fixes the above issue.