readnames() was missing from rw?stat and resulted in a null dereference. Reference: /n/atom/patch/applied2013/lnfsnit Date: Fri May 31 01:30:57 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/lnfs/lnfs.c Fri May 31 01:30:28 2013 +++ /sys/src/cmd/lnfs/lnfs.c Fri May 31 01:30:28 2013 @@ -472,6 +472,7 @@ d = dirstat(s_to_c(f->path)); if(d == nil) return passerror(); + readnames(); d->name = short2long(d->name); n = convD2M(d, statbuf, sizeof statbuf); free(d); @@ -491,6 +492,7 @@ if(readonly) return Eperm; convM2D(thdr.stat, thdr.nstat, &d, (char*)rdata); + readnames(); d.name = long2short(d.name, 1); n = dirwstat(s_to_c(f->path), &d); if(n < 0) @@ -797,6 +799,8 @@ shorttolong = mkavltree(namecmp); longtoshort = mkavltree(namecmp); + if(shorttolong == nil || longtoshort == nil) + sysfatal("lnfs: malloc: %r"); } /*