ref: 595cdc78fc454c069f270f3b238bb703fa6336fe
parent: 5ca1befc75ac88237bc59433cff31b84611b2b4f
author: Jacob Moody <moody@posixcafe.org>
date: Wed Jun 22 11:53:32 EDT 2022
kernel: correct error handling in /srv/clone read readstr can error, we need to catch the error and unlock.
--- a/sys/src/9/port/devsrv.c
+++ b/sys/src/9/port/devsrv.c
@@ -557,8 +557,13 @@
if(NETTYPE(c->qid.path) == Qlease){
b = c->aux;
rlock(b);
+ if(waserror()){
+ runlock(b);
+ nexterror();
+ }
n = readstr((ulong)off, va, n, b->name);
runlock(b);
+ poperror();
return n;
}
isdir(c);
--
⑨