]> git.proxmox.com Git - mirror_zfs.git/commit
Fix error handling incallers of dbuf_hold_level()
authorTom Caputi <tcaputi@datto.com>
Thu, 17 Jan 2019 23:47:08 +0000 (18:47 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 17 Jan 2019 23:47:08 +0000 (15:47 -0800)
commit305781da4bbe11acef8707894d7e33f8aef3ca8e
tree3ac436d2d8c1fe88daee63964e838bdab9f63cd2
parent75058f33034d23801818582996d3dc941c545910
Fix error handling incallers of dbuf_hold_level()

Currently, the functions dbuf_prefetch_indirect_done() and
dmu_assign_arcbuf_by_dnode() assume that dbuf_hold_level() cannot
fail. In the event of an error the former will cause a NULL pointer
dereference and the later will trigger a VERIFY. This patch adds
error handling to these functions and their callers where necessary.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8291
cmd/ztest/ztest.c
include/sys/dmu.h
module/zfs/dbuf.c
module/zfs/dmu.c
module/zfs/dmu_recv.c
module/zfs/zfs_vnops.c