anyone believe this KASSERT?

From: Sam Leffler (sam_at_errno.com)
Date: 10/23/03

  • Next message: Barney Wolff: "Re: Thoughts on IPv6, was: Re: Help Broadcasting a UDP packet on the LAN:URGENT"
    To: freebsd-net@freebsd.org
    Date: Thu, 23 Oct 2003 14:41:36 -0700
    
    

    uipc_socket.c has a KASSERT in soreceive that I think is wrong. It dates from
    a long time ago but I can't tell exactly who created it since some
    intermediate munging buggered the CVS logs.

    cvs diff: Diffing .
    Index: uipc_socket.c
    ===================================================================
    RCS file: /usr/ncvs/src/sys/kern/uipc_socket.c,v
    retrieving revision 1.155
    diff -u -r1.155 uipc_socket.c
    --- uipc_socket.c 21 Oct 2003 18:28:35 -0000 1.155
    +++ uipc_socket.c 23 Oct 2003 20:33:04 -0000
    @@ -855,9 +855,11 @@
                (so->so_rcv.sb_cc < so->so_rcv.sb_lowat ||
                ((flags & MSG_WAITALL) && uio->uio_resid <= so->so_rcv.sb_hiwat))
    &&
                m->m_nextpkt == 0 && (pr->pr_flags & PR_ATOMIC) == 0)) {
    +#if 0
                    KASSERT(m != 0 || !so->so_rcv.sb_cc,
                        ("receive: m == %p so->so_rcv.sb_cc == %u",
                        m, so->so_rcv.sb_cc));
    +#endif
                    if (so->so_error) {
                            if (m)
                                    goto dontblock;

    In particular the m != 0 clause is suspicous since the enclosing if permits m
    to be 0 and the code inside carefully handles the case.

    I've been running w/o this assert for several weeks w/o a problem. Previously
    I was seeing it trip for NFS related traffic.

    Anyone care to justify keeping this?

            Sam

    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Barney Wolff: "Re: Thoughts on IPv6, was: Re: Help Broadcasting a UDP packet on the LAN:URGENT"