----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.csiden.org/r/217/ -----------------------------------------------------------
(Updated May 27, 2015, 12:15 p.m.) Review request for OpenZFS Developer Mailing List and Matthew Ahrens. Summary (updated) ----------------- 5961 Fix stack overflow and panic on FreeBSD. Bugs: 5961 https://www.illumos.org/projects/illumos-gate//issues/5961 Repository: illumos-gate Description ------- Do not put zfsvfs_t on the stack. Its size of 7656 bytes consumes too much stack. Allocate it temporarily instead. On FreeBSD the kernel stack size is 16384. Issuing 'zpool create' command builds a kernel stack consisting of at least 36 frames, with zfs_create_fs() somewhere in the middle. If kernel is compiled with -O0, then stack will be exhausted and kernel panics. The default compilation option is -O2, and it doesn't panic yet. But still putting extra 7656 bytes is risky. If any of the 36 functions is modified to consume a bit more stack, we will panic on the default kernel. Diffs ----- usr/src/uts/common/fs/zfs/zfs_znode.c 4664899d13f86f556b71aaca6949448ffd45b0eb Diff: https://reviews.csiden.org/r/217/diff/ Testing ------- With the patch, FreeBSD 11-CURRENT compiled with -O0 doesn't panic on 'zpool create'. Thanks, Gleb Smirnoff
_______________________________________________ developer mailing list developer@open-zfs.org http://lists.open-zfs.org/mailman/listinfo/developer