diff -ru rpc.lockd/lockd_lock.c rpc.lockd.patched/lockd_lock.c --- rpc.lockd/lockd_lock.c Sun Oct 26 07:10:44 2003 +++ rpc.lockd.patched/lockd_lock.c Tue Feb 10 10:46:41 2004 @@ -385,7 +385,7 @@ if (newfl == NULL) { return NULL; } - bzero(newfl, sizeof(newfl)); + bzero(newfl, sizeof(*newfl)); newfl->client.oh.n_bytes = malloc(lockowner->n_len); if (newfl->client.oh.n_bytes == NULL) { @@ -438,6 +438,7 @@ void deallocate_file_lock(struct file_lock *fl) { + LIST_REMOVE(fl, nfslocklist); free(fl->client.oh.n_bytes); free(fl->client_cookie.n_bytes); free(fl); @@ -1246,6 +1247,12 @@ * current element has been moved */ nfl = LIST_NEXT(ifl, nfslocklist); + + if (nfl == ifl) { + debuglog("nfl == ifl, resetting nfl\n"); + nfl = NULL; + } + debuglog("Iterator choice %p\n",ifl); debuglog("Prev iterator choice %p\n",pfl); debuglog("Next iterator choice %p\n",nfl); @@ -2152,7 +2159,7 @@ static struct nlm4_res retval4; debuglog("About to send granted on blocked lock\n"); - sleep(1); + sleep(debugdelay); debuglog("Blowing off return send\n"); cli = get_client(fl->addr,