John Poduska
e6b28efccc
Prevent race condition in dnode_dest ( #10101 )
...
dnode_special_close() waits for the refcount of dn_holds to go to zero
without holding the dn_mtx. dnode_rele_and_unlock() does the final
remove to dn_holds with dn_mtx being held:
refs = zfs_refcount_remove(&dn->dn_holds, tag);
mutex_exit(&dn->dn_mtx);
So, there is a race condition after the remove until dn_mtx is
dropped. During that time, dnode_destroy() can get called, which ends
up in dnode_dest() calling mutex_destroy() and a panic since the lock
is still held.
This change adds a condvar to wait for the final dnode_rele_and_unlock()
to release the dn_mtx before calling dnode_destroy().
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: John Poduska <jpoduska@datto.com>
Closes #7814
Closes #10101
2020-03-12 10:25:56 -07:00
..
2020-02-06 13:21:06 -08:00
2020-03-12 10:24:43 -07:00
2017-11-04 13:25:13 -07:00
2019-07-26 10:54:14 -07:00
2019-09-13 18:09:06 -07:00
2019-06-19 09:48:12 -07:00
2019-06-19 09:48:12 -07:00
2019-12-05 12:37:00 -08:00
2018-06-06 09:35:59 -07:00
2019-09-03 12:12:31 -07:00
2019-09-05 14:49:49 -07:00
2020-02-27 17:12:44 -08:00
2020-02-26 16:09:17 -08:00
2019-10-09 10:36:03 -07:00
2019-12-03 09:51:44 -08:00
2019-09-05 14:49:49 -07:00
2020-02-28 14:49:44 -08:00
2020-02-03 09:33:14 -08:00
2019-09-12 13:31:09 -07:00
2020-03-10 10:51:04 -07:00
2019-09-05 14:49:49 -07:00
2020-02-26 16:09:17 -08:00
2019-09-05 14:49:49 -07:00
2020-02-24 15:38:22 -08:00
2020-02-05 11:07:19 -08:00
2020-03-12 10:25:56 -07:00
2020-02-26 16:09:17 -08:00
2020-02-25 15:59:29 -08:00
2020-02-26 16:09:17 -08:00
2019-10-09 10:36:03 -07:00
2019-10-09 10:36:03 -07:00
2019-12-05 12:37:00 -08:00
2020-02-26 16:09:17 -08:00
2019-12-11 11:53:57 -08:00
2020-02-26 16:09:17 -08:00
2020-02-26 16:09:17 -08:00
2019-09-02 17:56:41 -07:00
2019-10-10 09:47:06 -07:00
2016-11-29 14:34:27 -08:00
2020-02-18 11:22:56 -08:00
2019-09-06 11:26:26 -07:00
2017-10-11 16:54:48 -04:00
2019-10-01 13:17:32 -07:00
2015-01-16 14:41:26 -08:00
2020-02-14 13:41:42 -08:00
2019-12-05 12:37:00 -08:00
2020-02-28 14:49:44 -08:00
2019-11-01 13:13:43 -07:00
2019-06-19 09:48:12 -07:00
2019-07-15 13:57:56 -07:00
2019-10-11 10:13:21 -07:00
2019-08-13 21:24:43 -06:00
2019-11-01 13:13:43 -07:00
2019-12-05 12:37:00 -08:00
2019-09-06 11:26:26 -07:00
2016-11-29 14:34:27 -08:00
2010-08-31 13:41:58 -07:00
2020-02-26 16:09:17 -08:00
2019-11-21 09:32:57 -08:00
2019-09-02 17:56:41 -07:00
2020-03-02 09:43:30 -08:00
2019-09-05 14:49:49 -07:00
2020-02-10 13:11:30 -08:00
2020-03-04 15:07:11 -08:00
2019-10-09 10:36:03 -07:00
2019-10-09 10:36:03 -07:00
2018-06-06 09:35:59 -07:00
2018-06-06 09:35:59 -07:00
2019-12-05 12:37:00 -08:00
2019-03-21 12:47:57 -07:00
2019-10-09 10:36:03 -07:00
2019-12-05 12:37:00 -08:00
2019-07-10 15:54:49 -07:00
2019-12-05 12:37:00 -08:00
2019-12-05 12:37:00 -08:00
2020-02-27 09:31:02 -08:00
2019-11-21 09:32:57 -08:00
2019-12-26 10:57:05 -08:00
2019-06-20 18:29:02 -07:00
2019-10-09 10:36:03 -07:00
2019-12-17 19:34:52 -08:00
2019-07-12 09:31:20 -07:00
2019-07-12 09:31:20 -07:00
2019-09-05 09:34:54 -07:00
2019-09-05 09:34:54 -07:00
2019-10-10 09:45:37 -07:00
2020-02-03 10:52:41 -08:00
2020-01-23 11:01:24 -08:00
2020-01-23 11:01:24 -08:00
2019-08-21 09:29:23 -07:00
2019-10-10 09:45:37 -07:00
2019-09-05 09:34:54 -07:00
2020-01-23 11:01:24 -08:00
2019-10-09 10:36:03 -07:00
2019-12-26 10:50:23 -08:00
2019-06-20 18:29:02 -07:00
2020-03-04 15:07:11 -08:00
2020-02-26 16:09:17 -08:00
2020-02-26 16:09:17 -08:00
2019-10-09 10:36:03 -07:00
2019-09-05 14:49:49 -07:00
2020-02-26 16:09:17 -08:00
2018-02-08 15:29:24 -08:00
2019-09-02 17:56:41 -07:00
2020-02-14 13:41:42 -08:00
2020-02-26 16:09:17 -08:00
2020-02-26 16:09:17 -08:00
2019-12-05 12:37:00 -08:00
2019-09-02 17:56:41 -07:00
2018-11-08 16:47:24 -08:00
2019-12-11 12:12:08 -08:00
2020-02-28 14:50:32 -08:00
2020-02-28 14:53:18 -08:00
2020-02-28 14:50:32 -08:00
2019-12-11 12:12:08 -08:00
2018-03-04 17:34:51 -08:00
2020-01-22 17:55:56 -08:00
2019-11-06 10:54:25 -08:00
2019-10-02 09:15:12 -07:00
2019-11-11 09:27:59 -08:00
2019-12-05 13:10:29 -08:00
2019-12-10 15:51:58 -08:00
2019-12-05 12:37:00 -08:00
2020-03-04 15:08:41 -08:00
2018-02-09 10:08:05 -08:00
2019-11-01 13:13:43 -07:00
2019-07-26 10:54:14 -07:00
2020-02-03 09:33:14 -08:00