Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 2004 18:30:29 -0400 (EDT)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Andre Oppermann <andre@FreeBSD.ORG>
Cc:        cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/netinet ip_divert.c raw_ip.ctcp_hostcache.c  tcp_subr.c tcp_syncache.c udp_usrreq.c
Message-ID:  <200408112230.i7BMUTfr077252@khavrinen.lcs.mit.edu>
In-Reply-To: <411A60D4.7C25D34E@freebsd.org>
References:  <20040811175052.GA37093@freefall.freebsd.org> <411A60D4.7C25D34E@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 11 Aug 2004 20:09:24 +0200, Andre Oppermann <andre@FreeBSD.ORG> said:

> In all cases the zone is used as kmalloc replacement.  It always
> initializes a newly allocated object.  It always unlinks the object
> from any lists before it uma_zfree's it.  All such operations are
> covered by mutexes, no concurrent access should happen.  If there
> is any use-after-free then it is a bug that needs to be fixed.

No, it is an intentional design choice, not a bug.  Lock-free
synchronization is good, particularly when you're copying out a giant
wodge of PCBs to userland (or doing anything else that might take a
really long time).  Locks should not be held during this process.

-GAWollman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408112230.i7BMUTfr077252>