Re: Oops NFS Locking in 2.4.x

Olivier Molteni (olivier@molteni.net)
Mon, 10 Sep 2001 23:26:25 +0200


Trond Myklebust wrote:

>
> Looks like 2 processes are trying to free the same lock. The problem
> is that both processes can call filp_close() at the same
> time (by calling sys_close()).
>
> The bug boils down to:
>
> - locks_unlock_delete() assumes that the BKL (kernel_lock()) is
> sufficient to protect against *thisfl_p from disappearing
> beneath it due to some second process.
> BUT
> - The call to lock() in locks_unlock_delete() sleeps when the
> underlying filesystem is NFS, hence 2 processes can race despite
> the BKL assumption.
>
> Cheers,
> Trond

Hi (2),

While searching on the sourceforge nfs list, I saw your message 4583160
posted on 10/31/2000 08:14:42 and concerning "[NFS] [PATCH] fix deadlocks
+ blocking in 2.4.0 pre6/7 knfsd locking..."
You give a patch modifying fs/loks.c wher, among other things, you were
added the new function locks_unlock_delete().

Do you know if all the patch had been included in the kernel or if some
part that deals with deadlocks were omited for some reasons ?
Do you think this corrections failed to definitively fix the deadlocks
problems ?

You are talking about semaphores in your post, do you think it's a
possible way to follow in order to fix the situation ?

Cheers,
Olivier.

-
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/