diff --git a/sys/src/9/port/devmnt.c b/sys/src/9/port/devmnt.c index 8ff159704..77a64c81a 100644 --- a/sys/src/9/port/devmnt.c +++ b/sys/src/9/port/devmnt.c @@ -307,6 +307,9 @@ mntattach(Chan *c, Chan *ac, char *spec, int flags) Mnt *m; Mntrpc *r; + if(ac != nil && ac->mchan != c) + error(Ebadusefd); + m = c->mux; if(m == nil){ mntversion(c, nil, 0, 0);