Re: [9fans] minor kernel bug

2014-06-05 Thread erik quanstrom
oh, but you missed a spot in lock. - erik

Re: [9fans] minor kernel bug

2014-06-05 Thread erik quanstrom
> we do that in ilock() and canlock() so it's a bug I think to not do it also > in lock(). > The field is only used in iprintcanlock which use canlock(), not lock(), so > this > if fine, but for consistency it would be better to also do it in lock() no? ilock and unlock could assert(l->m->machno

[9fans] minor kernel bug

2014-06-04 Thread Yoann Padioleau
Hi, Here is a patch for tasklock.c: int lock(Lock *l) { int i; ulong pc; pc = getcallerpc(&l); lockstats.locks++; if(up) inccnt(&up->nlocks);/* prevent being scheded */ if(tas(&l->key) == 0){ if(up)