Make m_mclfree() MP safe by fixing a N->0 dereferencing race. The spinlock
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 12 Aug 2007 01:46:26 +0000 (01:46 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 12 Aug 2007 01:46:26 +0000 (01:46 +0000)
commit1d16b2b589fec7a16d55f542dba1c3bba0959cc2
treeab01d5c41686678853fdda89554d9fa5c33f533c
parent4c1e250976b6f4f02aff8c966d55f5d12f59623a
Make m_mclfree() MP safe by fixing a N->0 dereferencing race.  The spinlock
wasn't safe because the structure is dynamically allocated and freed.
Instead just use atomic_cmpset_int() to detect the 1->0 transition.
sys/kern/uipc_mbuf.c