file locking (fcntl) bug in 2.4.19

From: Andy Tai (lichengtai@yahoo.com)
Date: Thu Aug 29 2002 - 22:52:36 EST


Hi, there is a bug on file locking (via fcntl) on
linux kernel 2.4.19 when locking files in a NFS
volume.

Try to mount a remote NFS server on a directory in a
machine running Linux 2.4.19 as follows:

mount -o nfsvers=3,intr <remote NFS server path> /mnt

Then run the attached program which demonstrates the
bug:

lockbug /mnt/xx

and it keeps showing the error

lock failed with error: No locks available

The file has not been locked so there must be locks
available. The error message is wrong.

Trying this on a file in a local drive does not show
the error.

The attached program basically forks a child and in
the child it tries to lock a file descriptor that was
opened in the parent.

Thanks for any help on working around this bug.

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com


-
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 : Sat Aug 31 2002 - 22:00:29 EST