svn commit: r297742 - head/sys/netinet

John Baldwin jhb at freebsd.org
Sat Apr 9 20:57:02 UTC 2016


On Saturday, April 09, 2016 06:31:24 PM Bjoern A. Zeeb wrote:
> On Sat, 9 Apr 2016, John Baldwin wrote:
> > trash user data.  In the rest of the tree, we tend to prefer marking items
> > as NOFREE instead of this approach putting a priority on stability and
> > reliability over memory efficiency.
> >
> > For all of the zones that you removed NOFREE from, do you know why that was
> > added in the first place (e.g. which stale pointers to pcbs could be
> > referenced after free)?  Did you verify that those conditions have been
> > fixed?
> 
> I did check.  I did check a few years ago (and I think you had
> reviewed that; maybe it was trouble).  And the TCP bits here were
> the last ones that were problematic back then.  With the changes from
> r281599 this should no longer be a problem.
> 
> As for the others, a few years ago Andre already removed the NOFREE
> and we unconditionally made him back the change out, which was a
> mistake as otherwise some of these zones would have been "clean" for
> years.  Others have had KASSERTs ensuring that on VNET stack they were
> actually empty.

Ok.  I believe one of the old ones fixed long ago were the pcb sysctls.
I couldn't recall any other cases that required NOFREE.  The network stack
is often fairly loose with references especially those that add per-packet
overhead (at least historically, the ifnet reference in m_pkthdr is one of
the "big" remaining issues IIRC), so I sort of assume it still needs NOFREE
as a general rule.

-- 
John Baldwin


More information about the svn-src-head mailing list