Commit fbb5490c authored by Jordan Chang's avatar Jordan Chang Committed by Suren Baghdasaryan
Browse files

ANDROID: Avoid get_order(0) in kmalloc_gfp_adjust tracepoint



The tracepoint `trace_android_vh_adjust_kvmalloc_flags` in
`kmalloc_gfp_adjust` is called with `get_order(size)`. Since `kvmalloc`
can be called with `size = 0`, this can result in `get_order(0)`, which
has undefined behavior.

Prevent this by adding a `size > 0` check before calling the tracepoint.

Bug: 450002836
Change-Id: Iaa76bbcf34a873971c422b97498181824bbd48fd
Signed-off-by: default avatarJordan Chang <jordanchang@google.com>
parent 065dac09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment