summaryrefslogtreecommitdiffstats
path: root/crypto/authenc.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2023-06-26 16:46:00 +0200
committerMike Snitzer <snitzer@kernel.org>2023-06-27 22:02:18 +0200
commitda8b4fc1f63a01a0eca9338ae338b804c437b51f (patch)
treed4b671cee1d6c6e28a52a760d6757d9deaa1319c /crypto/authenc.c
parentdm integrity: reduce vmalloc space footprint on 32-bit architectures (diff)
downloadlinux-da8b4fc1f63a01a0eca9338ae338b804c437b51f.tar.xz
linux-da8b4fc1f63a01a0eca9338ae338b804c437b51f.zip
dm integrity: only allocate recalculate buffer when needed
dm-integrity preallocated 8MiB buffer for recalculating in the constructor and freed it in the destructor. This wastes memory when the user has many dm-integrity devices. Fix dm-integrity so that the buffer is only allocated when recalculation is in progress; allocate the buffer at the beginning of integrity_recalc() and free it at the end. Note that integrity_recalc() doesn't hold any locks when allocating the buffer, so it shouldn't cause low-memory deadlock. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'crypto/authenc.c')
0 files changed, 0 insertions, 0 deletions