Matthew Ahrens
02dc43bc46
OpenZFS 8378 - crash due to bp in-memory modification of nopwrite block
...
Authored by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>
The problem is that zfs_get_data() supplies a stale zgd_bp to
dmu_sync(), which we then nopwrite against.
zfs_get_data() doesn't hold any DMU-related locks, so after it
copies db_blkptr to zgd_bp, dbuf_write_ready() could change
db_blkptr, and dbuf_write_done() could remove the dirty record.
dmu_sync() then sees the stale BP and that the dbuf it not dirty,
so it is eligible for nop-writing.
The fix is for dmu_sync() to copy db_blkptr to zgd_bp after
acquiring the db_mtx. We could still see a stale db_blkptr,
but if it is stale then the dirty record will still exist and
thus we won't attempt to nopwrite.
OpenZFS-issue: https://www.illumos.org/issues/8378
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3127742
Closes #6293
2017-07-04 15:41:24 -07:00
..
2017-05-02 10:06:18 -07:00
2017-07-04 15:28:58 -07:00
2016-11-29 14:34:27 -08:00
2015-01-16 14:41:26 -08:00
2017-05-26 11:42:10 -07:00
2017-01-17 14:49:24 -08:00
2017-06-26 14:36:49 -07:00
2016-09-13 09:58:33 -07:00
2017-06-29 10:18:03 -07:00
2015-01-16 14:41:26 -08:00
2016-12-02 16:59:35 -07:00
2016-09-13 09:58:33 -07:00
2017-06-19 09:43:16 -07:00
2017-06-09 09:43:26 -07:00
2017-06-09 09:46:14 -07:00
2016-11-02 12:14:45 -07:00
2017-05-10 13:52:22 -04:00
2016-12-12 10:46:26 -08:00
2017-07-04 15:41:24 -07:00
2017-03-20 18:36:00 -07:00
2017-06-29 10:18:03 -07:00
2017-06-30 11:11:01 -07:00
2017-07-04 15:29:52 -07:00
2017-05-04 19:26:28 -04:00
2016-08-31 14:35:34 -07:00
2017-01-27 11:43:42 -08:00
2017-06-12 11:41:03 -07:00
2017-05-10 13:52:22 -04:00
2016-12-20 18:46:59 -08:00
2017-05-25 17:15:06 -07:00
2015-05-04 09:41:10 -07:00
2016-06-28 13:47:03 -07:00
2016-11-29 14:34:27 -08:00
2016-12-12 10:46:26 -08:00
2017-03-22 17:58:47 -07:00
2017-05-19 13:45:46 -07:00
2015-01-16 14:41:26 -08:00
2017-03-22 17:58:47 -07:00
2017-04-09 16:12:35 -07:00
2017-03-20 18:36:00 -07:00
2016-04-21 09:49:25 -07:00
2017-01-22 13:25:40 -08:00
2017-04-25 17:41:58 -07:00
2017-03-22 17:58:47 -07:00
2016-08-31 14:35:34 -07:00
2017-02-28 16:10:18 -08:00
2017-01-03 11:31:18 -06:00
2017-04-14 11:11:28 -07:00
2016-11-29 14:34:27 -08:00
2016-11-29 14:34:27 -08:00
2010-08-31 13:41:58 -07:00
2017-01-03 11:31:18 -06:00
2014-08-06 14:48:41 -07:00
2016-08-11 11:23:49 -07:00
2017-05-19 12:30:16 -07:00
2017-01-03 11:31:18 -06:00
2017-06-01 06:39:42 -07:00
2017-04-09 16:12:35 -07:00
2017-01-12 09:42:11 -08:00
2016-05-26 10:11:51 -07:00
2017-05-10 13:52:22 -04:00
2015-07-14 10:35:21 -07:00
2016-08-31 14:35:34 -07:00
2017-03-28 11:06:22 -07:00
2017-05-12 17:28:03 -07:00
2017-05-12 17:28:03 -07:00
2017-05-19 12:30:16 -07:00
2017-05-12 17:28:03 -07:00
2017-05-12 17:28:03 -07:00
2017-06-27 10:09:16 -07:00
2016-11-29 14:34:33 -08:00
2017-01-22 13:25:40 -08:00
2016-11-29 14:34:33 -08:00
2016-11-29 14:34:33 -08:00
2016-12-15 17:31:33 -08:00
2016-12-12 10:46:26 -08:00
2017-01-22 13:25:40 -08:00
2016-11-29 14:34:33 -08:00
2016-11-29 14:34:33 -08:00
2017-01-22 13:25:40 -08:00
2017-01-22 13:25:40 -08:00
2017-05-12 17:28:03 -07:00
2017-05-12 17:28:03 -07:00
2017-05-19 12:30:16 -07:00
2017-02-02 14:13:41 -08:00
2017-05-04 19:26:28 -04:00
2017-05-04 19:26:28 -04:00
2017-04-10 10:24:17 -07:00
2017-01-12 09:42:11 -08:00
2017-03-10 09:51:33 -08:00
2010-08-31 13:41:58 -07:00
2017-06-05 11:26:25 -07:00
2017-04-12 13:36:48 -07:00
2017-03-10 09:51:33 -08:00
2017-05-18 17:35:49 -07:00
2017-03-10 09:51:33 -08:00
2017-07-04 15:29:52 -07:00
2017-06-09 09:15:37 -07:00
2015-06-22 17:02:13 -07:00
2017-03-10 09:51:33 -08:00
2017-01-03 11:31:18 -06:00
2017-03-10 09:51:33 -08:00
2017-05-25 09:55:55 -07:00
2017-07-04 15:41:24 -07:00
2017-06-09 09:43:26 -07:00
2017-06-09 09:15:37 -07:00
2017-03-29 12:24:51 -07:00
2016-11-29 14:34:27 -08:00
2017-06-16 17:21:11 -07:00
2017-06-09 09:15:37 -07:00
2010-05-28 13:45:14 -07:00
2017-05-10 09:30:48 -07:00
2016-12-12 10:46:26 -08:00
2017-03-10 09:51:33 -08:00
2017-05-10 09:30:48 -07:00
2017-03-10 09:51:41 -08:00
2017-05-10 09:30:48 -07:00
2017-01-23 10:35:58 -08:00
2017-07-04 15:41:24 -07:00