summaryrefslogtreecommitdiffstats
path: root/lib/libc/string
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-12-03 22:15:16 +0000
committerkib <kib@FreeBSD.org>2012-12-03 22:15:16 +0000
commit69dfcf0272e9843f5132e35241d7124bbae253ba (patch)
treed0f98ecb0caa60b2d54680222378d7fe086fb13d /lib/libc/string
parent20b909215d96066e1480c2630adb246a1e4a3342 (diff)
downloadFreeBSD-src-69dfcf0272e9843f5132e35241d7124bbae253ba.zip
FreeBSD-src-69dfcf0272e9843f5132e35241d7124bbae253ba.tar.gz
The vnode_free_list_mtx is required unconditionally when iterating
over the active list. The mount interlock is not enough to guarantee the validity of the tailq link pointers. The __mnt_vnode_next_active() and __mnt_vnode_first_active() active lists iterators helper functions did not provided the neccessary stability for the list, allowing the iterators to pick garbage. This was uncovered after the r243599 made the active list iterators non-nop. Since a vnode interlock is before the vnode_free_list_mtx, obtain the vnode ilock in the non-blocking manner when under vnode_free_list_mtx, and restart iteration after the yield if the lock attempt failed. Assert that a vnode found on the list is active, and assert that the helpers return the vnode with interlock owned. Reported and tested by: pho MFC after: 1 week
Diffstat (limited to 'lib/libc/string')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud