]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dbuf.c
Fix NULL pointer dereference in dbuf_prefetch_indirect_done()
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Sun, 20 Nov 2022 23:04:08 +0000 (18:04 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 29 Nov 2022 18:00:50 +0000 (10:00 -0800)
commit97fac0fb70e35bb01c0d97f227c802c0fcbbf3da
treedb04a54393cecd27cb7d0da383007f8f4934eb47
parent887fb37843887f79582003f55b314530b870643a
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
module/zfs/dbuf.c