Re: [PATCH] /proc/locks bugfix

From: willy@thepuffingroup.com
Date: Fri Apr 21 2000 - 13:48:23 EST


On Fri, Apr 21, 2000 at 11:52:54AM +0200, Manfred Spraul wrote:
> Hi Linus,
>
> I found 2 bugs in the proc interface of /proc/locks:
>
> * lock_kernel() was missing.
> * the code ignored the requested length. read(fd,buf,1) returned the
> complete info (1.6 kB).

There are actually worse problems than this in locks.c. It's called
from nfs lockd without the big kernel lock held at all (it holds a
semaphore on the inode, but this is inadequate). I've fixed this in
my tree by putting all accesses to the lock data structures under its
own semaphore. I hadn't spotted the problem with /proc/locks, but I
wasn't looking for it :-) I noticed a race condition with my solution
yesterday, so I'm fixing that and hopefully I should be able to get a
rearchitected locks.c out in a couple of weeks time. I'm doing a few
other things to it at the same time...

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



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:19 EST