> It wouldn't surprise me if kobj_getsymname() needed a lock that was > being held by the thread doing modload. (Modload changes the kernel > symbol table by loading in a new binary, after all.)
That, and using 4K of stack seems like a bad idea, especially when only 10 stack frames are being recorded by getpcstack(). > > I coded thus: > > > > 23 int _init(void) > > 24 { > > 25 int i, depth, status; > > 26 pc_t mystack[1024]; > > 27 char *sym; > > 28 ulong_t off; > > 29 > > 30 status = mod_install(&modlinkage); > > 31 cmn_err(CE_NOTE,"me filed\n"); > > 32 depth = getpcstack(mystack, 10); > > 33 for (i = 0; i < depth; i++) { > > 34 sym = kobj_getsymname((uintptr_t)mystack[i], > > &off); > > 35 cmn_err(CE_NOTE, "sym=%s %x %d\n", sym, > > (uintptr_t) myst > > ack[i], off); > > 36 } > > 37 return status; > > 38 } > > > > Technically is there any problem with this piece of code? > > > > modloading it will result in hanging the system. -- meem _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code