diff options
author | Charan Teja Reddy <[email protected]> | 2020-12-14 19:13:26 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-12-15 12:13:46 -0800 |
commit | b8ca396f984295ba09f25f6982f9abd0bb7f5a29 (patch) | |
tree | ed4db6b74a48a9d51777a5aea9ce7016512c329b /lib/mpi/mpi-mod.c | |
parent | a4efc174b382fcdb62e2d90d39e78a274a975e38 (diff) |
mm: cma: improve pr_debug log in cma_release()
It is required to print 'count' of pages, along with the pages, passed to
cma_release to debug the cases of mismatched count value passed between
cma_alloc() and cma_release() from a code path.
As an example, consider the below scenario:
1) CMA pool size is 4MB and
2) User doing the erroneous step of allocating 2 pages but freeing 1
page in a loop from this CMA pool. The step 2 causes cma_alloc() to
return NULL at one point of time because of -ENOMEM condition.
And the current pr_debug logs is not giving the info about these types of
allocation patterns because of count value not being printed in
cma_release().
We are printing the count value in the trace logs, just extend the same to
pr_debug logs too.
[[email protected]: fix printk warning]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Charan Teja Reddy <[email protected]>
Reviewed-by: Souptick Joarder <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Vinayak Menon <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions