From owner-cvs-src@FreeBSD.ORG Thu May 5 19:57:04 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6204716A4CE; Thu, 5 May 2005 19:57:04 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F9D443DC0; Thu, 5 May 2005 19:57:04 +0000 (GMT) (envelope-from ps@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j45Jv4wr078587; Thu, 5 May 2005 19:57:04 GMT (envelope-from ps@repoman.freebsd.org) Received: (from ps@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j45Jv4g2078586; Thu, 5 May 2005 19:57:04 GMT (envelope-from ps) Message-Id: <200505051957.j45Jv4g2078586@repoman.freebsd.org> From: Paul Saab Date: Thu, 5 May 2005 19:57:04 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sys/compat/linux linux_ipc.c src/sys/kern sysv_msg.c src/sys/sys syscallsubr.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2005 19:57:04 -0000 ps 2005-05-05 19:57:04 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/compat/linux linux_ipc.c sys/kern sysv_msg.c sys/sys syscallsubr.h Log: MFC: - Tweak kern_msgctl() to return a copy of the requested message queue id structure in the struct pointed to by the 3rd argument for IPC_STAT and get rid of the 4th argument. The old way returned a pointer into the kernel array that the calling function would then access afterwards without holding the appropriate locks and doing non-lock-safe things like copyout() with the data anyways. This change removes that unsafeness and resulting race conditions as well as simplifying the interface. Revision Changes Path 1.39.2.4 +2 -3 src/sys/compat/linux/linux_ipc.c 1.53.2.6 +5 -7 src/sys/kern/sysv_msg.c 1.11.2.12 +1 -2 src/sys/sys/syscallsubr.h