]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r355736: zfs boot: fix a crash in a rarely taken path in fzap_lookup
authorAndriy Gapon <avg@FreeBSD.org>
Thu, 27 Feb 2020 14:48:12 +0000 (14:48 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Thu, 27 Feb 2020 14:48:12 +0000 (14:48 +0000)
commit793f223eea75b757def05547f60a15d621ff1800
tree7dbdf9d89ca040f54a774a0e95faf3c8107aa163
parentb8e1d489cde4ad74399392c6abccf938ef675be4
MFC r355736: 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.

Sponsored by: Panzura
stand/libsa/zfs/zfsimpl.c