shithub: riscv

Download patch

ref: 7211fd7ce71de2347f3a00f1229ee1ac74b006e9
parent: 6d4e9f11b79148742198a8ec334d99053cb7cfce
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Wed Oct 30 17:24:44 EDT 2013

fix devshr related panic caused by Mount.to being nil (thanks mischief!)

the shr mount is linked into the Mhead with m->to initially nil. only
after the the server has been attached is m->to set. just check for
it in createdir().

--- a/sys/src/9/port/chan.c
+++ b/sys/src/9/port/chan.c
@@ -1171,7 +1171,7 @@
 		nexterror();
 	}
 	for(f = m->mount; f; f = f->next){
-		if(f->mflag&MCREATE){
+		if(f->to != nil && (f->mflag&MCREATE) != 0){
 			nc = cclone(f->to);
 			runlock(&m->lock);
 			poperror();
--