mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:04:51 +01:00
mm/cma: pair the trace_cma_alloc_start/finish
In the bad input validation cases, there is no trace_cma_alloc_finish to match the trace_cma_alloc_start. Move the trace_cma_alloc_start event after the validations. Link: https://lkml.kernel.org/r/20250605072532.972081-1-richardycc@google.com Signed-off-by: Richard Chang <richardycc@google.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Kalesh Singh <kaleshsingh@google.com> Cc: Martin Liu <liumartin@google.com> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
99edea3005
commit
08e21e2412
1 changed files with 2 additions and 2 deletions
4
mm/cma.c
4
mm/cma.c
|
|
@ -854,8 +854,6 @@ static struct page *__cma_alloc(struct cma *cma, unsigned long count,
|
|||
unsigned long i;
|
||||
const char *name = cma ? cma->name : NULL;
|
||||
|
||||
trace_cma_alloc_start(name, count, align);
|
||||
|
||||
if (!cma || !cma->count)
|
||||
return page;
|
||||
|
||||
|
|
@ -865,6 +863,8 @@ static struct page *__cma_alloc(struct cma *cma, unsigned long count,
|
|||
if (!count)
|
||||
return page;
|
||||
|
||||
trace_cma_alloc_start(name, count, align);
|
||||
|
||||
for (r = 0; r < cma->nranges; r++) {
|
||||
page = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue