kern/163076: It is not possible to read in chunks from linprocfs and procfs.

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Dec 9 15:00:28 UTC 2011


The following reply was made to PR kern/163076; it has been noted by GNATS.

From: "Poul-Henning Kamp" <phk at phk.freebsd.dk>
To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des at des.no>
Cc: Jaakko Heinonen <jh at FreeBSD.org>, Petr Salinger <Petr.Salinger at seznam.cz>,
        bug-followup at FreeBSD.org, mdf at FreeBSD.org
Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs and procfs.
Date: Fri, 09 Dec 2011 14:51:15 +0000

 In message <86d3bxaljt.fsf at ds4.des.no>, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= wr
 ites:
 >Jaakko Heinonen <jh at FreeBSD.org> writes:
 >> As I wrote existing code depends on sbuf_len() to return the actual
 >> length regardless of the error status after sbuf_finish(). I am not
 >> willing to through all code using sbufs to check where it causes
 >> problems. phk@ asserts that r222004 is correct.
 >
 >What if the sbuf is in a state where asking for its length is
 >meaningless?
 
 It will always have a length, but the length may not represent
 all you tried to stuff into the sbuf, if the sbuf has failed.
 
 -- 
 Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
 phk at FreeBSD.ORG         | TCP/IP since RFC 956
 FreeBSD committer       | BSD since 4.3-tahoe    
 Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-bugs mailing list