The unload_page callback expects the return value of load_page() as its argument: ret = load_page(va); unload(ret). Fix the rollback code in simple_ring_buffer_init_mm() where the descriptor's VA is used instead of the loaded page address.
Unified · Split
| @@ -430,7 +430,7 @@ int simple_ring_buffer_init_mm(struct simple_rb_per_cpu *cpu_buffer, · 429 unmodified lines | |||
| 430 | 430 | ||
| 431 | if (ret) { | 431 | if (ret) { |
| 432 | for (i--; i >= 0; i--) | 432 | for (i--; i >= 0; i--) |
| 433 | unload_page((void *)desc->page_va[i]); | 433 | unload_page(bpages[i].page); |
| 434 | unload_page(cpu_buffer->meta); | 434 | unload_page(cpu_buffer->meta); |
| 435 | 435 | ||
| 436 | return ret; | 436 | return ret; |