mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
prefetch-pioctls-overflow-20001104
1024 was being used of a buffer which wasn't that large.
This commit is contained in:
parent
1f7dd88936
commit
a2daff69dd
@ -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)) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user