Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2001 12:11:52 -0500
From:      "Bosko Milekic" <bmilekic@technokratis.com>
To:        "John Hay" <jhay@icomtek.csir.co.za>, <itojun@iijlab.net>
Cc:        <freebsd-net@FreeBSD.ORG>
Subject:   Re: kernel: nd6_storelladdr failed, mbuf leak
Message-ID:  <005501c0a660$89fc2bd0$becbca18@jehovah>
References:  <11354.983881225@coconut.itojun.org>

next in thread | previous in thread | raw e-mail | index | archive | help

itojun wrote:

>
> >> > > I then noticed that "... kernel: nd6_storelladdr failed" gets
logged
> >> > > often and after a while all mbufs are used. It turned out
that in
> >> > > sys/net/if_ethersubr.c in ether_output() when
nd6_storelladdr()
> >> > fails,
> >> > > it does a return(0) and does not free the mbuf. I
checked -current
> >> > > and it is still like that.
>
> will correct it.  thanks for reporting.
>
> itojun

    This behavior is absolutely horrible. What ought to be fixed, if
ether_input() is supposed to be freeing the passed in mbuf, is that
ether_input() should instead accept a pointer to a pointer so that
after it frees the mbuf it can NULL out the initial pointer. Because
of promoting similar existing coding practises in this area of the
code, what we're seeing is ether_input() effectively returning an mbuf
to the free list while the caller still holds a live pointer to that
mbuf.

Regards,
Bosko.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005501c0a660$89fc2bd0$becbca18>