]> git.proxmox.com Git - mirror_zfs.git/commit
Fix memory allocation issue for BLAKE3 context
authorTino Reichardt <milky-zfs@mcmilk.de>
Tue, 21 Jun 2022 21:32:09 +0000 (23:32 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Jun 2022 21:32:09 +0000 (14:32 -0700)
commitdeb1213098e2dc10e6eee5e5c57bb40584e096a6
treee2405b47aef3e81fbfaab04423a8111dcb4e2631
parentb17663f571bfa1ef5e77d3c72f1610bacfc0c6ad
Fix memory allocation issue for BLAKE3 context

The kmem_alloc(sizeof (*ctx), KM_NOSLEEP) call on FreeBSD can't be
used in this code segment. Work around this by pre-allocating a percpu
context array for later use.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #13568
include/sys/blake3.h
module/icp/algs/blake3/blake3_impl.c
module/zfs/blake3_zfs.c
module/zfs/zfs_chksum.c