Re: lockd hanging

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Fri Apr 26 2002 - 03:30:41 EST


On Wednesday 24. April 2002 23:13, Daniel Forrest wrote:
> The bug I have found is in fs/lockd/svclock.c and is caused by downing
> an already downed semaphore:
>
> ->nlmsvc_lock calls down(&file->f_sema)

Just exactly what is f_sema protecting? I've looked at the code, and I just
can't figure out why we need a semaphore there at all.

AFAICS, all we are using them for is to protect the 2 lists f_shares and
f_blocks in struct nlm_file. Since we are already holding the BKL, I don't
see why we need an extra lock. (Yes: nlmsvc_delete_block() can sleep, so we
need to be careful with the loop in nlmsvc_traverse_blocks(), but that is
trivial to cope with...)

As for calling nlmclnt_lookup_host() in nlmsvc_create_block(). Why not just
pass the value that we looked up in nlmsvc_proc_lock()?

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:12 EST