HomeFreeBSD

Fix error handling incallers of dbuf_hold_level()

Description

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

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Jan 17 2019, 11:47 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 17 2019, 11:47 PM
Parents
rG75058f33034d: Remove unused vdev_t fields
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG305781da4bbe: Fix error handling incallers of dbuf_hold_level() (authored by Tom Caputi <tcaputi@datto.com>).Jan 17 2019, 11:47 PM