]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix dereference after null check in enqueue_range
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Sun, 4 Dec 2022 21:31:28 +0000 (16:31 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 8 Dec 2022 22:15:21 +0000 (14:15 -0800)
commit242a5b748cbf02001a1324f3e195df56f8f28f5a
tree88bdc61cf1a715b8d23ec09d0775ed011386b1f6
parentf954ea26a615cecc8573bb439482d9fd88019854
Fix dereference after null check in enqueue_range

If the bp is NULL, we have a hole. However, when we build with
assertions, we will dereference bp when `blkid == DMU_SPILL_BLKID`. When
this happens on a hole, we will have a NULL pointer dereference.

Reported-by: Coverity (CID-1524670)
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14264
module/zfs/dmu_send.c