[OpenAFS] gcc reading beyond end of file on AFS
emoy@apple.com
emoy@apple.com
Sat, 25 Jan 2003 15:22:54 -0800
I downloaded osi_vnodeops.c, which had a few other changes besides the
memset (corrected number of arguments to osi_FlushPages()). I did have
to change #include <afsincludes.h> to #include <afs/afsincludes.h>, but
maybe it was moved in the latest sources as well.
Anyways, that does seem to fix the problem.
Thanks,
Edward Moy
Apple Computer, Inc.
emoy@apple.com
(This message is from me as a reader of this list, and not a statement
from Apple.)
On Saturday, January 25, 2003, at 10:42 AM, Derrick J Brashear wrote:
> On Sat, 25 Jan 2003, RD Schaffer wrote:
>
>> Hi there,
>>
>> I cannot explain technically what is going on. But I understand
>> that
>> this is a bug in open afs, which I found a little while ago. If you
>> need a working version of afs to allow builds, you can use the arla
>> client. (I believe they already had this problem but fixed it.) I do
>> not know the schedule for a bug fix for openafs, but am interested to
>> know as well.
>
> Get RCS version 1.4.2.5 of src/afs/DARWIN/osi_vnodeops.c and drop it in
> your tree, then rebuild the client. Alternately, apply this patch:
> *** openafs/src/afs/DARWIN/osi_vnodeops.c 2002/10/16 03:58:17
> 1.10
> --- openafs/src/afs/DARWIN/osi_vnodeops.c 2003/01/07 23:03:35
> 1.11
> ***************
> *** 467,472 ****
> --- 467,477 ----
> }
> afs_BozonUnlock(&tvc->pvnLock, tvc);
> AFS_GUNLOCK();
> +
> + /* Zero out rest of last page if there wasn't enough data in the
> file */
> + if (code == 0 && auio.uio_resid > 0)
> + memset(aiov.iov_base, 0, auio.uio_resid);
> +
> kernel_upl_unmap(kernel_map, pl);
> if (!nocommit) {
> if (code)