> When I do a "du -a /" on a plan9 cpu server via drawterm,  drawterm
> gets a sigsegv after a while.  Gdb  reports that the sigsegv arrived
> when tas.c:9 (inline assembler code to do test and set) is called.  I
> cannot see anything wrong with the tas code though.

The problem isn't in tas but its caller -- note that tas
is being passed a null pointer.  Thanks for the gdb 
stack trace, which was very helpful.

The fix this change to kern/devfs-posix.c (a similar
change applies to kern/devfs-win32.c too):

                cname = addelem(cname, name[i]);
                wq->qid[i] = nc->qid;
        }
-       nc->name = nil;
-       cnameclose(cname);
+       nc->name = cname;
        if(i != nname){
                cclose(nc);
                wq->clone = nil;

The bug is only triggered when traversing paths 
more than 16 levels deep on the local machine.

Russ

Reply via email to