Subject: Re: kern/21696: another panic from nfsrv_commit()
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-net
Date: 05/27/2003 14:35:30
In article <20030527140735.GA1647@antioche.lip6.fr>,
Manuel Bouyer <bouyer@antioche.lip6.fr> wrote:
>Hi,
>I just submitted this.
>I submitted it as a PR because I'll be AFK for a few days, and I hope
>another developer will pick this up and commit before I'm back :)
>
>Anyway, comments on the patch welcome.
How about:
if (cnt < 0 || cnt > vp->v_size) {
log("nfsrv_commit: bad cnt %d, size %d", cnt, vp->v_size);
cnt = vp->v_size;
}
if (off < 0 || off > vp->v_size) {
log("nfsrv_commit: bad off %d, size %d", off, vp->v_size);
off = vp->v_size - cnt;
}