]> git.proxmox.com Git - mirror_zfs.git/commit
Make abd_raidz_gen_iterate() pass an initialized pointer to the callback
authorMark Johnston <markjdb@gmail.com>
Tue, 7 Nov 2023 18:24:15 +0000 (13:24 -0500)
committerGitHub <noreply@github.com>
Tue, 7 Nov 2023 18:24:15 +0000 (10:24 -0800)
commitf4cd1bac723633a22adafc87c2a9f874fbcbc9d6
treef0e079fd40c37d96b8a0c68fb0ea5b3bb99109b0
parent358ce2cf28a99095915deb883cbacd2d2e1f7b63
Make abd_raidz_gen_iterate() pass an initialized pointer to the callback

Otherwise callbacks may trigger KMSAN violations in the dlen == 0 case.
For example, raidz_syn_pq_abd() will compare an uninitialized pointer
with itself before returning.  This seems harmless, but let's maintain
good hygiene and avoid passing uninitialized variables, if only to
placate KMSAN.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #15491
module/zfs/abd.c