smalloc: fix ptr address in redzone error message
authorVincent Fu <vincent.fu@samsung.com>
Tue, 5 Apr 2022 17:32:49 +0000 (17:32 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 5 Apr 2022 17:47:35 +0000 (11:47 -0600)
commit06bbdc1cb857a11e6d1b7c089126397daca904fe
tree6cc8fb138010a162024a7b1b327665069f1a1375
parent87933e32e356b15b85c6d9775d5e840994080a4f
smalloc: fix ptr address in redzone error message

sfree_check_redzone is passed a pointer to the address of the *header*
of an allocated block. This does not match the address of any of the
buffers returned by smalloc. Adjust the value printed out to refer to
the address returned by smalloc associated with the header in question.
This makes debugging easier because it allows us to more easily identify
the buffer where over-/under-run occurred.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
smalloc.c