Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hdr_recl calls zthr_wakeup() on destroyed zthr
There exists a race condition were hdr_recl() calls zthr_wakeup() on a destroyed zthr. The timeline is the following: [1] hdr_recl() runs first and goes intro zthr_wakeup() because arc_initialized is set. [2] arc_fini() is called by another thread, zeroes that flag, destroying the zthr, and goes into buf_init(). [3] hdr_recl() tries to enter the destroyed mutex and we blow up. This patch ensures that the ARC's zthrs are not offloaded any new work once arc_initialized is set and then destroys them after all of the ARC state has been deleted. Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
- Loading branch information