Adjust the test of a KASSERT to better match the intent.
This assertion was added in r246213 as a guard against corrupted mbufs arriving from drivers, the key distinguishing factor of said mbufs being that they had a negative length. Given we're in a while loop specifically designed to skip over zero-length mbufs, panicking on a zero-length mbuf seems incorrect. No objection from: kib
This commit is contained in:
parent
e808299c02
commit
6d659a5d9b
@ -219,7 +219,8 @@ nfsm_mbufuio(struct nfsrv_descript *nd, struct uio *uiop, int siz)
|
||||
}
|
||||
mbufcp = NFSMTOD(mp, caddr_t);
|
||||
len = mbuf_len(mp);
|
||||
KASSERT(len > 0, ("len %d", len));
|
||||
KASSERT(len >= 0,
|
||||
("len %d, corrupted mbuf?", len));
|
||||
}
|
||||
xfer = (left > len) ? len : left;
|
||||
#ifdef notdef
|
||||
|
Loading…
Reference in New Issue
Block a user