From owner-cvs-all Sun Dec 8 10:35:22 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76D9737B401; Sun, 8 Dec 2002 10:35:21 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3764343EB2; Sun, 8 Dec 2002 10:35:21 -0800 (PST) (envelope-from iedowse@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gB8IUimV092699; Sun, 8 Dec 2002 10:30:44 -0800 (PST) (envelope-from iedowse@repoman.freebsd.org) Received: (from iedowse@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gB8IUiV1092690; Sun, 8 Dec 2002 10:30:44 -0800 (PST) Message-Id: <200212081830.gB8IUiV1092690@repoman.freebsd.org> From: Ian Dowse Date: Sun, 8 Dec 2002 10:30:44 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/compat/linux linux_file.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iedowse 2002/12/08 10:30:44 PST Modified files: sys/compat/linux linux_file.c Log: Fix emulation of the fcntl64() syscall. In Linux, this is exactly the same as fcntl() except that it supports the new 64-bit file locking commands (LINUX_F_GETLK64 etc) that use the `flock64' structure. We had been interpreting all flock structures passed to fcntl64() as `struct flock64' instead of only the ones from F_*64 commands. The glibc in linux_base-7 uses fcntl64() by default, but the bug was often non-fatal since the misinterpretation typically only causes junk to appear in the `l_len' field and most junk values are accepted as valid range lengths. The result is occasional EINVAL errors from F_SETLK and a few bytes after the supplied `struct flock' getting clobbered during F_GETLK. PR: kern/37656 Reviewed by: marcel Approved by: re MFC after: 1 week Revision Changes Path 1.72 +33 -39 src/sys/compat/linux/linux_file.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message