mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm, kasan: don't call kasan_krealloc() from ksize().
Instead of calling kasan_krealloc(), which replaces the memory allocation stack ID (if stack depot is used), just unpoison the whole memory chunk. Signed-off-by: Alexander Potapenko <[email protected]> Acked-by: Andrey Ryabinin <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Konstantin Serebryany <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
55834c5909
commit
4ebb31a42f
2 changed files with 4 additions and 3 deletions
|
|
@ -4501,7 +4501,7 @@ size_t ksize(const void *objp)
|
|||
/* We assume that ksize callers could use the whole allocated area,
|
||||
* so we need to unpoison this area.
|
||||
*/
|
||||
kasan_krealloc(objp, size, GFP_NOWAIT);
|
||||
kasan_unpoison_shadow(objp, size);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue