lkml.org 
[lkml]   [2002]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: lockd hanging
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.061 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site