fixup! tlsf: move kasan_poison_shadow into tlsf_add_pool
PATCH 1/1 fixup! tlsf: move kasan_poison_shadow into tlsf_add_pool
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(-)
common/tlsf.c +1 -1
@@ -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; }
Signature · 1 line
2.47.3
Sascha Hauer
AppliedQuoted 8 lines · Ahmad Fatoum
tlsf: do not poison the control structure more than once
The
control_tstructure is only associated with atlsf_t, not a merelpool_t. Poisoning the control structure again intlsf_poolthus served no purpose.[...]
Applied, thanks!
[1/1] fixup! tlsf: move kasan_poison_shadow into tlsf_add_pool
https://git.pengutronix.de/cgit/barebox/commit/?id=c2db61d98b09 (link may not be stable)
Best regards,
Signature · 1 line
Sascha Hauer <[email protected]>