summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/__error.c
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2001-01-16 01:53:13 +0000
committerbmilekic <bmilekic@FreeBSD.org>2001-01-16 01:53:13 +0000
commit3650624f860c7421853deb5ba07cd75ea8b4128a (patch)
tree353164b25a0588e4b31024b05c340c8b9dd86fc2 /lib/libc/sys/__error.c
parent20a8a23d2b99a3392aeb543a6d96167366f82e2a (diff)
downloadFreeBSD-src-3650624f860c7421853deb5ba07cd75ea8b4128a.zip
FreeBSD-src-3650624f860c7421853deb5ba07cd75ea8b4128a.tar.gz
Add some KASSERTs valid if WITNESS is defined to verify that the mbuf
allocation routines are being called safely. Since we drop our relevant mbuf mutex and acquire Giant before we call kmem_malloc(), we have to make sure that this does not pave the way for a fatal lock order reversal. Check that either Giant is already held (in which case it's safe to grab it again and recurse on it) or, if Giant is not held, that no other locks are held before we try to acquire Giant. Similarily, add a KASSERT valid in the WITNESS case in m_reclaim() to nail callers who end up in m_reclaim() and hold a lock. Pointed out by: jhb
Diffstat (limited to 'lib/libc/sys/__error.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud