Re: clang: kern/vfs_subr.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > Finally a case where clang isn't entirely helpful. Because vp->v_tag > is an enum, clang thinks its value can't be bigger than 15 and that > the vp->v_tag >= nitems(vtags) check is therefore always false. But I > think we want to prevent an out-of-bounds access here if t

clang: kern/vfs_subr.c

2016-09-24 Thread Mark Kettenis
Finally a case where clang isn't entirely helpful. Because vp->v_tag is an enum, clang thinks its value can't be bigger than 15 and that the vp->v_tag >= nitems(vtags) check is therefore always false. But I think we want to prevent an out-of-bounds access here if the vnode is corrupted somehow.