svn commit: r314813 - head/sys/kern

Ngie Cooper (yaneurabeya) yaneurabeya at gmail.com
Tue Mar 7 04:04:22 UTC 2017


> On Mar 6, 2017, at 19:08, Ngie Cooper (yaneurabeya) <yaneurabeya at gmail.com> wrote:

…

> The KASSERT is bad — please fix it. From https://ci.freebsd.org/job/FreeBSD-head-amd64-test/1994/console :
> 
> add host 127.0.0.1panic: sbcut_internal: len is 0 but it is supposed to be +ve

len == 0 has special meaning; please see sbflush_internal. This works.
Thanks,
-Ngie

$ svn diff sys/kern/uipc_sockbuf.c
Index: sys/kern/uipc_sockbuf.c
===================================================================
--- sys/kern/uipc_sockbuf.c     (revision 314827)
+++ sys/kern/uipc_sockbuf.c     (working copy)
@@ -1043,8 +1043,7 @@
 {
        struct mbuf *m, *next, *mfree;

-       KASSERT(len > 0, ("%s: len is %d but it is supposed to be +ve",
-           __func__, len));
+       KASSERT(len >= 0, ("%s: len is negative (%d)", __func__, len));
        KASSERT(len <= sb->sb_ccc, ("%s: len: %d is > ccc: %u",
            __func__, len, sb->sb_ccc));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20170306/ec860cbe/attachment.sig>


More information about the svn-src-all mailing list