prefetch-pioctls-overflow-20001104

1024 was being used of a buffer which wasn't that large.
This commit is contained in:
Chaskiel M Grundman 2000-11-05 01:16:17 +00:00 committed by Derrick Brashear
parent 1f7dd88936
commit a2daff69dd
2 changed files with 4 additions and 4 deletions

View File

@ -358,7 +358,7 @@ void BPath(ab)
code = gop_lookupname((char *)ab->parm[0], AFS_UIOSYS, 1, (struct vnode **) 0, (struct vnode **)&tvn);
#endif
AFS_GLOCK();
osi_FreeSmallSpace((char *)ab->parm[0]); /* free path name buffer here */
osi_FreeLargeSpace((char *)ab->parm[0]); /* free path name buffer here */
if (code) return;
/* now path may not have been in afs, so check that before calling our cache manager */
if (!tvn || !IsAfsVnode((struct vnode *) tvn)) {

View File

@ -1942,14 +1942,14 @@ struct AFS_UCRED *acred;
AFS_STATCNT(Prefetch);
if (!apath) return EINVAL;
tp = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
tp = osi_AllocLargeSpace(1024);
AFS_COPYINSTR(apath, tp, 1024, &bufferSize, code);
if (code) {
osi_FreeSmallSpace(tp);
osi_FreeLargeSpace(tp);
return code;
}
if (afs_BBusy()) { /* do this as late as possible */
osi_FreeSmallSpace(tp);
osi_FreeLargeSpace(tp);
return EWOULDBLOCK; /* pretty close */
}
afs_BQueue(BOP_PATH, (struct vcache*)0, 0, 0, acred, (long)tp, 0L, 0L, 0L);