From 7211fd7ce71de2347f3a00f1229ee1ac74b006e9 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 30 Oct 2013 21:24:44 +0100 Subject: [PATCH] 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(). --- sys/src/9/port/chan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/9/port/chan.c b/sys/src/9/port/chan.c index a8bd9522a..c74fb5d51 100644 --- a/sys/src/9/port/chan.c +++ b/sys/src/9/port/chan.c @@ -1171,7 +1171,7 @@ createdir(Chan *c, Mhead *m) 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();