]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r290959
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 30 Nov 2015 13:46:22 +0000 (13:46 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 30 Nov 2015 13:46:22 +0000 (13:46 +0000)
commit178a6fdbf7320aba028214f3e86ecefe0dfec83a
tree25cbe27e19eb51a2884f40ae7f6fde9f4da0c8bc
parent412ea8f8a5efe32630ccb62c407a2fb8aa4d1639
MFC: r290959
When the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy()
would call smb_iod_request(). This call could return as soon as the
wakeup(evp) in smb_iod_main() call is done and then could destroy
the mutexes. This caused a race with the rest of smb_iod_main()s
use of these mutexes.
A crash reported on freebsd-stable@ by Christian Kratzer was
diagnosed as a use of one of these mutexes after it was destroyed.
This patch moves destruction of the mutexes from smb_iod_destroy()
to the end of smb_iod_thread(), so that they aren't destroyed before
the thread is done with them. Christian comfirmed that the patch
stopped the crashes from happening.

git-svn-id: svn://svn.freebsd.org/base/stable/10@291489 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netsmb/smb_iod.c