shithub: riscv

Download patch

ref: f3feafc476ff108231dd6e0e3ac3cd420a62a81c
parent: b728f50a790afeec349c575b99028063a9d230c9
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Oct 23 13:18:35 EDT 2016

auth/factotum: bound the number of srv processes to 16, error the 9p rpc when it is over limit

--- a/sys/src/cmd/auth/factotum/fs.c
+++ b/sys/src/cmd/auth/factotum/fs.c
@@ -491,6 +491,10 @@
 
 	fss = r->fid->aux;
 	srv = r->srv;
+	if(srv->sref.ref == 1 && srv->rref.ref > 16){
+		respond(r, "too much activity");
+		return;
+	}
 	srvrelease(srv);
 	qlock(fss);
 	if(r->ifcall.type == Tread)