HomeFreeBSD

Fix NULL pointer dereference in dbuf_prefetch_indirect_done()

Description

Fix NULL pointer dereference in dbuf_prefetch_indirect_done()

When ZFS is built with assertions, a prefetch is done on a redacted
blkptr and dpa->dpa_dnode is NULL, we will have a NULL pointer
dereference in dbuf_prefetch_indirect_done().

Both Coverity and Clang's Static Analyzer caught this.

Reported-by: Coverity (CID 1524671)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14210

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Nov 20 2022, 11:04 PM
Tony Hutter <hutter2@llnl.gov>Committed on Dec 1 2022, 8:39 PM
Parents
rG0e3abd29945b: Lua: Fix bad bitshift in lua_strx2number()
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rGe48aaef89f3e: Fix NULL pointer dereference in dbuf_prefetch_indirect_done() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Dec 1 2022, 8:39 PM