Skip to content
Commit 77ce56e2 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jens Axboe
Browse files

drbd: dynamically allocate shash descriptor



Building with clang and KASAN, we get a warning about an overly large
stack frame on 32-bit architectures:

drivers/block/drbd/drbd_receiver.c:921:31: error: stack frame size of 1280 bytes in function 'conn_connect'
      [-Werror,-Wframe-larger-than=]

We already allocate other data dynamically in this function, so
just do the same for the shash descriptor, which makes up most of
this memory.

Link: https://lore.kernel.org/lkml/20190617132440.2721536-1-arnd@arndb.de/
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarRoland Kammerer <roland.kammerer@linbit.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 327fe1d4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment