Re: kernel 2.6.8 bug in fs/locks.c

From: Chris Wright
Date: Fri Oct 01 2004 - 14:29:20 EST


* Ivan Kalatchev (ivan.kalatchev@xxxxxx) wrote:
> I'm using pthreads for each user-application connections. To protect
> configuration file from corruption I used file locking mechanism - fcntl
> with F_WRLCK/F_RDLCK.

I must be confused. pthreads and fcntl locking...that does't give
proper exclusion? The BUG, however, is no good. Despite the fact
that it appears to come at the result of an application bug, we should
be able to handle this w/out a BUG. AFAICT, one thread has closed the
file descriptor, whilst another is mucking with the locks. So the locker
winds up holding the last ref to the filp. This blows the logic of when
locks_remove_posix gets called. Thanks for the bug report.

thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
-
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/