cvs commit: src/sys/netinet ip_divert.c raw_ip.ctcp_hostcache.c tcp_subr.c tcp_syncache.c udp_usrreq.c

Garrett Wollman wollman at khavrinen.lcs.mit.edu
Wed Aug 11 15:30:31 PDT 2004


<<On Wed, 11 Aug 2004 20:09:24 +0200, Andre Oppermann <andre at 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



More information about the cvs-src mailing list