mirror_zfs/tests/zfs-tests/tests/functional/cli_root
LOLi c434d8806c Stack overflow when destroying deeply nested clones
Destroy operations on deeply nested chains of clones can overflow
the stack:

        Depth    Size   Location    (221 entries)
        -----    ----   --------
  0)    15664      48   mutex_lock+0x5/0x30
  1)    15616       8   mutex_lock+0x5/0x30
...
 26)    13576      72   dsl_dataset_remove_clones_key.isra.4+0x124/0x1e0 [zfs]
 27)    13504      72   dsl_dataset_remove_clones_key.isra.4+0x18a/0x1e0 [zfs]
 28)    13432      72   dsl_dataset_remove_clones_key.isra.4+0x18a/0x1e0 [zfs]
...
185)     2128      72   dsl_dataset_remove_clones_key.isra.4+0x18a/0x1e0 [zfs]
186)     2056      72   dsl_dataset_remove_clones_key.isra.4+0x18a/0x1e0 [zfs]
187)     1984      72   dsl_dataset_remove_clones_key.isra.4+0x18a/0x1e0 [zfs]
188)     1912     136   dsl_destroy_snapshot_sync_impl+0x4e0/0x1090 [zfs]
189)     1776      16   dsl_destroy_snapshot_check+0x0/0x90 [zfs]
...
218)      304     128   kthread+0xdf/0x100
219)      176      48   ret_from_fork+0x22/0x40
220)      128     128   kthread+0x0/0x100

Fix this issue by converting dsl_dataset_remove_clones_key() from
recursive to iterative.

Reviewed-by: Paul Zuchowski <pzuchowski@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7279 
Closes #7810
2018-08-22 11:03:31 -07:00
..
zdb OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
zfs Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
zfs_bookmark Fix segfault in zfs_do_bookmark() 2018-02-26 09:55:18 -08:00
zfs_change-key Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
zfs_clone Stack overflow when destroying deeply nested clones 2018-08-22 11:03:31 -07:00
zfs_copies Use posix format for dist tarballs 2018-08-15 09:52:28 -07:00
zfs_create ZTS: Fix zfs_create_007_pos 2018-08-03 10:21:50 -07:00
zfs_destroy Always continue recursive destroy after error 2018-06-06 10:14:52 -07:00
zfs_diff ZTS: Fix zfs_diff_timestamp 2018-05-06 20:42:29 -07:00
zfs_get ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
zfs_inherit OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
zfs_load-key Clean up (k)shlib and cfg file shebangs 2018-04-08 19:37:22 -07:00
zfs_mount ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
zfs_program Add JSON output support to channel programs 2018-03-19 12:40:58 -07:00
zfs_promote Fix "file is executable, but no shebang" warnings 2018-04-06 16:34:21 -07:00
zfs_property Enable remaining tests 2017-05-22 12:34:32 -04:00
zfs_receive Allow inherited properties in zfs_check_settable() 2018-08-03 14:56:25 -07:00
zfs_remap Fix 'zfs remap <poolname@snapname>' 2018-04-19 09:45:17 -07:00
zfs_rename OpenZFS 9330 - stack overflow when creating a deeply nested dataset 2018-07-09 13:02:50 -07:00
zfs_reservation OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
zfs_rollback Fix "file is executable, but no shebang" warnings 2018-04-06 16:34:21 -07:00
zfs_send OpenZFS 9256 - zfs send space estimation off by > 10% on some datasets 2018-05-08 08:59:24 -07:00
zfs_set Fix "file is executable, but no shebang" warnings 2018-04-06 16:34:21 -07:00
zfs_share ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
zfs_snapshot Use posix format for dist tarballs 2018-08-15 09:52:28 -07:00
zfs_unload-key Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
zfs_unmount Fix "file is executable, but no shebang" warnings 2018-04-06 16:34:21 -07:00
zfs_unshare ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
zfs_upgrade Fix "file is executable, but no shebang" warnings 2018-04-06 16:34:21 -07:00
zpool Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
zpool_add ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
zpool_attach More ashift improvements 2017-05-03 09:31:05 -07:00
zpool_clear Fix "file is executable, but no shebang" warnings 2018-04-06 16:34:21 -07:00
zpool_create Fix 'zpool create -t <tempname>' 2018-05-07 21:11:58 -07:00
zpool_destroy ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
zpool_detach OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
zpool_events Clean up (k)shlib and cfg file shebangs 2018-04-08 19:37:22 -07:00
zpool_expand Add support for autoexpand property 2018-07-23 15:40:15 -07:00
zpool_export Fix "file is executable, but no shebang" warnings 2018-04-06 16:34:21 -07:00
zpool_get Introduce read/write kstats per dataset 2018-08-20 09:52:37 -07:00
zpool_history OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
zpool_import ZTS: Fix import_cache_device_replaced 2018-08-18 21:16:12 -07:00
zpool_labelclear Clean up (k)shlib and cfg file shebangs 2018-04-08 19:37:22 -07:00
zpool_offline Force fault a vdev with 'zpool offline -f' 2017-05-19 12:30:16 -07:00
zpool_online Wait for resilver after online 2018-04-13 18:04:10 -07:00
zpool_remove Fix "file is executable, but no shebang" warnings 2018-04-06 16:34:21 -07:00
zpool_reopen Add support for autoexpand property 2018-07-23 15:40:15 -07:00
zpool_replace More ashift improvements 2017-05-03 09:31:05 -07:00
zpool_scrub ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
zpool_set Fix zpool set feature@<feature>=disabled 2018-04-11 14:45:58 -07:00
zpool_split ZTS: Re-enable MMP tests 2018-05-07 21:08:33 -07:00
zpool_status zpool iostat/status -c improvements 2017-06-05 10:52:15 -07:00
zpool_sync OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
zpool_upgrade Use posix format for dist tarballs 2018-08-15 09:52:28 -07:00
cli_common.kshlib OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
Makefile.am Fix 'zfs remap <poolname@snapname>' 2018-04-19 09:45:17 -07:00