diff options
| author | Steven Rostedt <[email protected]> | 2025-05-27 18:31:44 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-05-29 12:24:08 +0000 |
| commit | 99d232804405e35d7a9af1536a057578a1442e81 (patch) | |
| tree | cb24e64a056ccfad4545e94acf4964bec16689ca /scripts/gcc-plugins/sancov_plugin.c | |
| parent | ring-buffer: Make ring_buffer_{un}map() simpler with guard(mutex) (diff) | |
| download | kernel-99d232804405e35d7a9af1536a057578a1442e81.tar.gz kernel-99d232804405e35d7a9af1536a057578a1442e81.zip | |
ring-buffer: Simplify functions with __free(kfree) to free allocations
The function rb_allocate_pages() allocates cpu_buffer and on error needs
to free it. It has a single return. Use __free(kfree) and return directly
on errors and have the return use return_ptr(cpu_buffer).
The function alloc_buffer() allocates buffer and on error needs to free
it. It has a single return. Use __free(kfree) and return directly on
errors and have the return use return_ptr(buffer).
The function __rb_map_vma() allocates a temporary array "pages". Have it
use __free() and not worry about freeing it when returning.
Cc: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/[email protected]
Reviewed-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/sancov_plugin.c')
0 files changed, 0 insertions, 0 deletions
