]> git.lizzy.rs Git - plan9front.git/commit
devproc: fix proccrlmemio bugs
authorcinap_lenrek <cinap_lenrek@felloff.net>
Mon, 14 Jul 2014 04:02:21 +0000 (06:02 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Mon, 14 Jul 2014 04:02:21 +0000 (06:02 +0200)
commit655ec332a714d3e5cc6aace798daf832e17e001e
tree90234eaf806722bf1fc54b298226128ce50f2b91
parente53511ef4c7d4db443543506e74e4de537da5475
devproc: fix proccrlmemio bugs

dont kill the calling process when demand load fails if fixfault()
is called from devproc. this happens when you delete the binary
of a running process and try to debug the process accessing uncached
pages thru /proc/$pid/mem file.

fixes to procctlmemio():

- fix missed unlock as txt2data() can error
- make sure the segment isnt freed by taking a reference (under p->seglock)
- access the page with segment locked (see comment)
- get rid of the segment stealer lock

other stuff:

- move txt2data() and data2txt() to segment.c
- add procpagecount() function
- make return type mcounseg() to ulong
sys/src/9/port/devproc.c
sys/src/9/port/fault.c
sys/src/9/port/portdat.h
sys/src/9/port/portfns.h
sys/src/9/port/proc.c
sys/src/9/port/segment.c
sys/src/9/port/swap.c