From owner-cvs-src-old@FreeBSD.ORG Fri May 15 14:42:03 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08D2F1065677 for ; Fri, 15 May 2009 14:42:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EA33B8FC21 for ; Fri, 15 May 2009 14:42:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n4FEg2DN021304 for ; Fri, 15 May 2009 14:42:02 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n4FEg2O4021303 for cvs-src-old@freebsd.org; Fri, 15 May 2009 14:42:02 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200905151442.n4FEg2O4021303@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Fri, 15 May 2009 14:41:44 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_descrip.c kern_sysctl.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2009 14:42:03 -0000 kib 2009-05-15 14:41:44 UTC FreeBSD src repository Modified files: sys/kern kern_descrip.c kern_sysctl.c Log: SVN rev 192144 on 2009-05-15 14:41:44Z by kib Revert r192094. The revision caused problems for sysctl(3) consumers that expect that oldlen is filled with required buffer length even when supplied buffer is too short and returned error is ENOMEM. Redo the fix for kern.proc.filedesc, by reverting the req->oldidx when remaining buffer space is too short for the current kinfo_file structure. Also, only ignore ENOMEM. We have to convert ENOMEM to no error condition to keep existing interface for the sysctl, though. Reported by: ed, Florian Smeets Tested by: pho Revision Changes Path 1.350 +15 -2 src/sys/kern/kern_descrip.c 1.194 +3 -5 src/sys/kern/kern_sysctl.c