kern: devproc: forbid open(OWRITE) of notes in Broken proceses

This commit is contained in:
Giacomo Tesio 2017-12-15 00:34:19 +01:00
parent c48d0e46ec
commit 7f1ba356f1
1 changed files with 2 additions and 0 deletions

View File

@ -403,6 +403,8 @@ procopen(Chan *c, unsigned long omode)
case Qnote: case Qnote:
if(p->privatemem) if(p->privatemem)
error(Eperm); error(Eperm);
if(p->state < Ready && omode != OREAD && omode != OSTAT)
error(Eperm);
break; break;
case Qmem: case Qmem: