diff options
Diffstat (limited to 'sys/fs/unionfs/union_subr.c')
-rw-r--r-- | sys/fs/unionfs/union_subr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 05e9399..c032ec8 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -989,8 +989,14 @@ unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td) uio.uio_resid = iov.iov_len; error = VOP_READDIR(lvp, &uio, cred, &eofflag, NULL, NULL); - if (error) + if (error != 0) break; + if (eofflag == 0 && uio.uio_resid == sizeof(buf)) { +#ifdef DIAGNOSTIC + panic("bad readdir response from lower FS."); +#endif + break; + } edp = (struct dirent*)&buf[sizeof(buf) - uio.uio_resid]; for (dp = (struct dirent*)buf; !error && dp < edp; |