HomeFreeBSD

Fix spa reference leak in zfs_ioc_pool_scan

Description

Fix spa reference leak in zfs_ioc_pool_scan

zfs_ioc_pool_scan leaks a spa reference when zc->zc_flags is not a
valid pool_scrub_cmd_t: this could happen if the userland binaries
and ZFS kernel module differ in version and would prevent the pool from
being exported.

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7380

Details

Provenance
LOLi <loli10K@users.noreply.github.com>Authored on Apr 4 2018, 12:31 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Apr 4 2018, 12:31 AM
Parents
rGf119d00c1fdc: Fix add_nested_replacing_spare test case
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG1724eb62debf: Fix spa reference leak in zfs_ioc_pool_scan (authored by LOLi <loli10K@users.noreply.github.com>).Apr 4 2018, 12:31 AM