HomeFreeBSD

zfs boot: fix a crash in a rarely taken path in fzap_lookup

Description

zfs boot: fix a crash in a rarely taken path in fzap_lookup

Instead of passing NULL to fzap_name_equal and crashing, just return
ENOENT. This happened when higher bits of a hash of the searched key
(its hash prefix) matched a hash prefix of some key in the ZAP, but the
full hash value of the searched key did not match any key in the ZAP.

I observerved this problem when loader tried to look up
"features_for_read" in a particular old pool that predates pool
features.

MFC after: 2 weeks
Sponsored by: Panzura

Details

Provenance
avgAuthored on
Parents
rS355735: Be consistent about checking return value from bus_delayed_attach_children.
Branches
Unknown
Tags
Unknown