svn commit: r275941 - head/sys/fs/nfs
Benno Rice
benno at FreeBSD.org
Fri Dec 19 19:09:24 UTC 2014
Author: benno
Date: Fri Dec 19 19:09:22 2014
New Revision: 275941
URL: https://svnweb.freebsd.org/changeset/base/275941
Log:
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
Modified:
head/sys/fs/nfs/nfs_commonsubs.c
Modified: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c Fri Dec 19 18:45:52 2014 (r275940)
+++ head/sys/fs/nfs/nfs_commonsubs.c Fri Dec 19 19:09:22 2014 (r275941)
@@ -219,7 +219,8 @@ nfsm_mbufuio(struct nfsrv_descript *nd,
}
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
More information about the svn-src-head
mailing list