HomeFreeBSD

Fix NULL pointer dereference in zio_ready()

Description

Fix NULL pointer dereference in zio_ready()

Clang's static analyzer correctly identified a NULL pointer dereference
in zio_ready() when ZIO_FLAG_NODATA has been set on a zio that is
missing a block pointer. The NULL pointer dereference occurs because we
have logic intended to disable ZIO_FLAG_NODATA when it has been set on a
gang block.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14469

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Feb 23 2023, 6:19 PM
GitHub <noreply@github.com>Committed on Feb 23 2023, 6:19 PM
Parents
rGc9e39da9a42a: Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG7cb67d627c0c: Fix NULL pointer dereference in zio_ready() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Feb 23 2023, 6:19 PM