Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(uzfs): Fix zc_nvlist_dst buffer allocation when ioctl is ZFS_IOC_…
…ERROR_LOG (#82) Normally, when the ZFS client/userland performs an ioctl, zc_nvlist_dst_size refers to the amount of bytes that should be allocated for zc_nvlist_dst. However, for ZFS_IOC_ERROR_LOG specifically, zc_nvlist_dst_size refers to the amount of error log objects (zbookmark_phys_t) that must be written into zc_nvlist_dst. When allocating memory for the zc_nvlist_dst, take this exception into account. This fixes a crash when retrieving a nonempty ZFS error log. Signed-off-by: Sjors Gielen <[email protected]>
- Loading branch information