HomeFreeBSD

Avoid some crashes when importing a pool with corrupt metadata

Description

Avoid some crashes when importing a pool with corrupt metadata

  • Skip invalid DVAs when importing pools in readonly mode (in addition to when the config is untrusted).
  • Upon encountering a DVA with a null VDEV, fail gracefully instead of panicking with a NULL pointer dereference.

Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Steve Mokris <smokris@softpixel.com>
Closes #9022

Details

Provenance
Steve Mokris <smokris@softpixel.com>Authored on Dec 26 2019, 6:57 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 26 2019, 6:57 PM
Parents
rGad353e214798: In initramfs, do not prompt if keylocation is "file://"
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGd5c97f3de7ac: Avoid some crashes when importing a pool with corrupt metadata (authored by Steve Mokris <smokris@softpixel.com>).Dec 26 2019, 6:57 PM