diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-12-29 07:48:19 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-12-29 07:48:19 +0100 |
commit | 42074003ca31dea9589012fe3e235e4ddec5be1f (patch) | |
tree | 853027cfd12f6cad1f310de95927455d71101656 /sys/src/9/port/fault.c | |
parent | afc2d547e18381ce2dd0f69f0e88860d49b7e54f (diff) |
kernel: dont call pprint() while holding up->debug qlock
pprint() might block or even (maliciously) call into
devproc write which will corrupt the qlock chain on attempt
to qlock up->debug again.
Diffstat (limited to 'sys/src/9/port/fault.c')
-rw-r--r-- | sys/src/9/port/fault.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/port/fault.c b/sys/src/9/port/fault.c index 47717ed87..b7fc8e9f2 100644 --- a/sys/src/9/port/fault.c +++ b/sys/src/9/port/fault.c @@ -328,7 +328,6 @@ okaddr(ulong addr, ulong len, int write) return 1; } } - pprint("suicide: invalid address %#lux/%lud in sys call pc=%#lux\n", addr, len, userpc()); return 0; } @@ -336,6 +335,7 @@ void validaddr(ulong addr, ulong len, int write) { if(!okaddr(addr, len, write)){ + pprint("suicide: invalid address %#lux/%lud in sys call pc=%#lux\n", addr, len, userpc()); postnote(up, 1, "sys: bad address in syscall", NDebug); error(Ebadarg); } |