FROMGIT: BACKPORT: mm/cma: fix placement of trace_cma_alloc_start/finish
The current placement of trace_cma_alloc_start/finish misses the fail cases: !cma || !cma->count || !cma->bitmap. trace_cma_alloc_finish is also not emitted for the failure case where bitmap_count > bitmap_maxno. Fix these missed cases by moving the start event before the failure checks and moving the finish event to the out label. Link: https://lkml.kernel.org/r/20240110012234.3793639-1-kaleshsingh@google.com Fixes: 7bc1aec5 ("mm: cma: add trace events for CMA alloc perf testing") Change-Id: I61153fe078da4f9f3338147f1fbb7697a5554078 Signed-off-by:Kalesh Singh <kaleshsingh@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Liam Mark <lmark@codeaurora.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit 3b08ab9a811caebe1327f25f51557f95200d94bf https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable) Bug: 315897033 [ Remove ret arg from trace_cma_alloc_finish - Kalesh Singh ] Signed-off-by:
Kalesh Singh <kaleshsingh@google.com>
Loading
Please sign in to comment