tlsf: do not poison the control structure more than once The control_t structure is only associated with a tlsf_t, not a merel pool_t. Poisoning the control structure again in tlsf_pool thus served no purpose.
Signed-off-by: Ahmad Fatoum <[email protected]> --- common/tlsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/tlsf.c b/common/tlsf.c index c4ba8259b261..3c72b41c0385 100644 --- a/common/tlsf.c +++ b/common/tlsf.c @@ -872,7 +872,6 @@ pool_t tlsf_add_pool(tlsf_t tlsf, void* mem, size_t bytes) block_set_prev_free(next); kasan_poison_shadow(mem, bytes, KASAN_TAG_INVALID); - kasan_poison_shadow(control, sizeof(control), KASAN_TAG_INVALID); return mem; } @@ -949,6 +948,7 @@ tlsf_t tlsf_create_with_pool(void* mem, size_t bytes) { tlsf_t tlsf = tlsf_create(mem); tlsf_add_pool(tlsf, (char*)mem + tlsf_size(), bytes - tlsf_size()); + kasan_poison_shadow(mem, tlsf_size(), KASAN_TAG_INVALID); return tlsf; } -- 2.47.3
