freebsd-skq/sys
bmilekic 1edc23feaa Make the slabrefzone, the zone from which we allocated slabs with
internal reference counters, UMA_ZONE_NOFREE.  This way, those slabs
(with their ref counts) will be effectively type-stable, then using
a trick like this on the refcount is no longer dangerous:

        MEXT_REM_REF(m);
        if (atomic_cmpset_int(m->m_ext.ref_cnt, 0, 1)) {
                if (m->m_ext.ext_type == EXT_PACKET) {
                        uma_zfree(zone_pack, m);
                        return;
                } else if (m->m_ext.ext_type == EXT_CLUSTER) {
                        uma_zfree(zone_clust, m->m_ext.ext_buf);
                        m->m_ext.ext_buf = NULL;
                } else {
                        (*(m->m_ext.ext_free))(m->m_ext.ext_buf,
                            m->m_ext.ext_args);
                        if (m->m_ext.ext_type != EXT_EXTREF)
                                free(m->m_ext.ref_cnt, M_MBUF);
                }
        }
        uma_zfree(zone_mbuf, m);

Previously, a second thread hitting the above cmpset might
actually read the refcnt AFTER it has already been freed.  A very
rare occurance.  Now we'll know that it won't be freed, though.

Spotted by: julian, pjd
2004-06-09 19:18:50 +00:00
..
alpha Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
amd64 In pmap_extract_and_hold(), there is no need to mask off PG_FRAME because 2004-06-08 02:20:40 +00:00
arm Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
boot Some embedded platforms have no keyboard controller. Give up waiting 2004-06-02 09:38:32 +00:00
cam Reformat the comments for cam_hdr so that they can be read. 2004-06-07 19:12:44 +00:00
coda add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
compat Add another 5.2.1 source compatibility tweak: acquire Giant before calling 2004-06-07 01:22:48 +00:00
conf Step 1 in moving EISA devices to kobj/newbus. Use kobj methods for 2004-06-09 16:08:20 +00:00
contrib Recognise NOINET6 as an indication to not build IPv6 enabled source even 2004-06-08 23:52:22 +00:00
crypto
ddb Fixed DDB_NOKLDSYM on amd64's: 2004-05-18 05:30:06 +00:00
dev Check if we control device. Else we will go to panic cause we don't have 2004-06-09 17:58:51 +00:00
fs Add MSG_NBIO flag option to soreceive() and sosend() that causes 2004-06-01 01:18:51 +00:00
geom Fix format string. 2004-06-07 13:40:40 +00:00
gnu Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
i4b add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
i386 Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
ia64 Machine generated patch which changes linedisc calls from accessing 2004-06-04 16:02:56 +00:00
isa add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
isofs/cd9660 Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
kern Fix a panic happening when m_getm() is called with len < MCLBYTES. 2004-06-09 14:53:35 +00:00
libkern Import libkern arm specific bits. 2004-05-14 12:28:31 +00:00
modules style.Makefile(5) 2004-06-09 08:27:05 +00:00
net Introduce a netisr to deliver kernel-generated routing, avoiding 2004-06-09 02:48:23 +00:00
net80211 Add some missing <sys/module.h> includes which are masked by the 2004-05-30 17:57:46 +00:00
netatalk Remove redundant call to soisdisconnected() from ddp_abort(), as it 2004-05-05 03:34:37 +00:00
netatm Remove an #if section originally written for Sun compilers. 2004-06-08 13:46:31 +00:00
netgraph Now that mbufs are allocated using uma, 2004-06-07 22:11:12 +00:00
netinet do not send icmp response if the original packet is encrypted. 2004-06-07 09:56:59 +00:00
netinet6 do not check super user privilege in ip6_savecontrol. It is 2004-06-02 15:41:18 +00:00
netipsec use correct address for SADB_EXT_ADDRESS_DST in key_do_allocsa_policy 2004-05-03 05:15:53 +00:00
netipx
netkey
netnatm
netncp add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
netsmb add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
nfs Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
nfs4client Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
nfsclient Make vm_page's PG_ZERO flag immutable between the time of the page's 2004-05-06 05:03:23 +00:00
nfsserver Giant wasn't dropped here if we have to return EBUSY. This is bad. 2004-05-31 20:21:06 +00:00
opencrypto add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
pc98 Add missing <sys/module.h> includes. 2004-06-07 06:04:27 +00:00
pccard
pci Replace handrolled CRC calculation with ether_crc32_[lb]e(). 2004-06-09 14:34:04 +00:00
posix4
powerpc Remove checks for curthread == NULL - it can't happen. 2004-06-03 10:22:47 +00:00
rpc Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
security add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
sparc64 Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
sys Reference count struct tty. 2004-06-09 09:41:30 +00:00
tools devlist2h.awk is too generic a name for what it does. It really 2004-05-26 00:19:39 +00:00
ufs Avoid assignments to cast expressions. 2004-06-08 13:08:19 +00:00
vm Make the slabrefzone, the zone from which we allocated slabs with 2004-06-09 19:18:50 +00:00
Makefile Try harder not to compile anything in sys/boot for arm. 2004-05-16 00:19:12 +00:00