aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_var.h
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2009-06-04 14:49:27 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2009-06-04 14:49:27 +0000
commit3144f812215550ac4bb500dd2eb66a4f90169149 (patch)
tree51ecc8b9fcef7600baf6a87c2905f7de4a94f298 /sys/net80211/ieee80211_var.h
parenta4fa5e6dd9017ed6d7550099bb0a0a12801d487e (diff)
downloadsrc-3144f812215550ac4bb500dd2eb66a4f90169149.tar.gz
src-3144f812215550ac4bb500dd2eb66a4f90169149.zip
Fix upcall races in the client side krpc. For the client side upcall,
holding SOCKBUF_LOCK() isn't sufficient to guarantee that there is no upcall in progress, since SOCKBUF_LOCK() is released/re-acquired in the upcall. An upcall reference counter was added to the upcall structure that is incremented at the beginning of the upcall and decremented at the end of the upcall. As such, a reference count == 0 when holding the SOCKBUF_LOCK() guarantees there is no upcall in progress. Add a function that is called just after soupcall_clear(), which waits until the reference count == 0. Also, move the mtx_destroy() down to after soupcall_clear(), so that the mutex is not destroyed before upcalls are done. Reviewed by: dfr, jhb Tested by: pho Approved by: kib (mentor)
Notes
Notes: svn path=/head/; revision=193437
Diffstat (limited to 'sys/net80211/ieee80211_var.h')
0 files changed, 0 insertions, 0 deletions