From 39cf6b34e34e02aa9bbec28295459769175681ad Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 16 Apr 2015 15:31:51 +0200 Subject: kernel: avoid posting note to kernel process in faulterror() the intend of posting a note to the faulting process is to interrupt the syscall to give the note handler a chance to handle it. kernel processes however, have no note handlers and all the postnote() does is set up->notepending which will make the next attempt to sleep raise an Eintr[] error. this is harmless, but usually not what we want. --- sys/src/9/port/fault.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/src/9/port/fault.c b/sys/src/9/port/fault.c index 123ae4e80..6565c670a 100644 --- a/sys/src/9/port/fault.c +++ b/sys/src/9/port/fault.c @@ -67,7 +67,8 @@ faulterror(char *s, Chan *c) s = buf; } if(up->nerrlab) { - postnote(up, 1, s, NDebug); + if(up->kp == 0) + postnote(up, 1, s, NDebug); error(s); } pexit(s, 1); -- cgit v1.2.3