From owner-freebsd-bugs@FreeBSD.ORG Tue Dec 13 15:20:12 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38E1B1065670 for ; Tue, 13 Dec 2011 15:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 27BE68FC1A for ; Tue, 13 Dec 2011 15:20:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBDFKCI6040800 for ; Tue, 13 Dec 2011 15:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBDFKCXa040799; Tue, 13 Dec 2011 15:20:12 GMT (envelope-from gnats) Date: Tue, 13 Dec 2011 15:20:12 GMT Message-Id: <201112131520.pBDFKCXa040799@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jaakko Heinonen Cc: Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs and procfs. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jaakko Heinonen List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2011 15:20:12 -0000 The following reply was made to PR kern/163076; it has been noted by GNATS. From: Jaakko Heinonen To: Poul-Henning Kamp Cc: Petr Salinger , bug-followup@FreeBSD.org, des@FreeBSD.org, mdf@FreeBSD.org Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs and procfs. Date: Tue, 13 Dec 2011 17:13:36 +0200 On 2011-12-11, Poul-Henning Kamp wrote: > >Only 21 of 133 calls I grepped through the FreeBSD source tree did check > >the return value [of sbuf_finish()] > > How many of them checked sbuf_error() instead ? I grepped 8 sbuf_error() calls. I'd say that 2 of them were used correctly instead of checking the return value of sbuf_finish(). > And seriously: how long would it take to fix 112 calls ? Majority of them seem to be autoextend buffers which are "OK" in kernel space. Some of the remaining are easy to fix but then there are harder ones like the pseudofs one. It looks like that some applications call sbuf_finish() from functions which are not expected to fail. -- Jaakko