Merge branch 'trace/ftrace/urgent' into HEAD
Needed to merge trace/ftrace/urgent to get:
Commit 59300b36f8
("ftrace: Check if pages were allocated before calling free_pages()")
To clean up the code that is affected by it as well.
This commit is contained in:
Коммит
22d5755a85
|
@ -3231,7 +3231,8 @@ ftrace_allocate_pages(unsigned long num_to_init)
|
|||
pg = start_pg;
|
||||
while (pg) {
|
||||
order = get_count_order(pg->size / ENTRIES_PER_PAGE);
|
||||
free_pages((unsigned long)pg->records, order);
|
||||
if (order >= 0)
|
||||
free_pages((unsigned long)pg->records, order);
|
||||
start_pg = pg->next;
|
||||
kfree(pg);
|
||||
pg = start_pg;
|
||||
|
@ -6418,7 +6419,8 @@ void ftrace_release_mod(struct module *mod)
|
|||
clear_mod_from_hashes(pg);
|
||||
|
||||
order = get_count_order(pg->size / ENTRIES_PER_PAGE);
|
||||
free_pages((unsigned long)pg->records, order);
|
||||
if (order >= 0)
|
||||
free_pages((unsigned long)pg->records, order);
|
||||
tmp_page = pg->next;
|
||||
kfree(pg);
|
||||
ftrace_number_of_pages -= 1 << order;
|
||||
|
@ -6778,7 +6780,8 @@ void ftrace_free_mem(struct module *mod, void *start_ptr, void *end_ptr)
|
|||
if (!pg->index) {
|
||||
*last_pg = pg->next;
|
||||
order = get_count_order(pg->size / ENTRIES_PER_PAGE);
|
||||
free_pages((unsigned long)pg->records, order);
|
||||
if (order >= 0)
|
||||
free_pages((unsigned long)pg->records, order);
|
||||
ftrace_number_of_pages -= 1 << order;
|
||||
ftrace_number_of_groups--;
|
||||
kfree(pg);
|
||||
|
|
|
@ -2985,7 +2985,8 @@ static void __ftrace_trace_stack(struct trace_buffer *buffer,
|
|||
|
||||
size = nr_entries * sizeof(unsigned long);
|
||||
event = __trace_buffer_lock_reserve(buffer, TRACE_STACK,
|
||||
sizeof(*entry) + size, trace_ctx);
|
||||
(sizeof(*entry) - sizeof(entry->caller)) + size,
|
||||
trace_ctx);
|
||||
if (!event)
|
||||
goto out;
|
||||
entry = ring_buffer_event_data(event);
|
||||
|
|
Загрузка…
Ссылка в новой задаче