Re: [FIX] kernel BUG at fs/locks.c:1723!

From: Trond Myklebust
Date: Sun May 23 2004 - 17:53:56 EST


På su , 23/05/2004 klokka 17:50, skreiv Andreas Gruenbacher:

> Here's a proposed fix. As a side effect, steal_locks no longer walks the
> global list of locks, but only the locks of all open inodes.
>
> What are the reasons (other than historic ones) for not getting rid of
> fl_owner and using fl_pid instead, by the way? I think that would clean up
> the whole mess with file locks a bit.

If I understand correctly, the fl_owner was introduced in order to deal
with the problem of lockd which has no control over which pids it has to
use. You should probably check with Olaf though...

In the end, this made for a horrible "solution", and causes no end of
bugs. Look for instance at the code in locks_remove_posix() which breaks
POSIX 'cos it gets the whole idea wrong and thinks that it suffices to
test the fl_owner instead of doing fl_pid (at least posix_same_owner() &
friends get that right).
IMO it would be better to set fl_owner to NULL for ordinary processes
(instead of dealing with this mess inside current->files), and then let
lockd set current->files in whatever way it needs to in order to
distinguish the various "pid spaces" it deals with...

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