diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-09-21 16:36:40 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-09-21 16:36:40 +0200 |
commit | 12fa017f3fc2687d3afb166fd30d9b134abb1da5 (patch) | |
tree | c0553968e821d7c9e9acddfa5a5d0fbd0ef20896 /sys/lib/python/compiler/pycodegen.py | |
parent | c45458b929e0f8e5eb26fd97c844977c893f6262 (diff) |
devproc: fix fishy locking in proctext(), check proc validity, static functions
the locking in proctext() is wrong. we have to acquire Proc.seglock
when reading segments from Proc.seg[] as segments do not
have a private freelist and can therefore be reused for other
data structures.
once we have Proc.seglock acquired, check that the process pid
is still valid so we wont accidentally read some other processes
segments. (for both proctext() and procctlmemio()). this also
should give better error message to distinguish the case when
the process did segdetach() the segment in question before we
could acquire Proc.seglock.
declare private functions as static.
Diffstat (limited to 'sys/lib/python/compiler/pycodegen.py')
0 files changed, 0 insertions, 0 deletions