Skip to content

Commit b9c6820

Browse files
committed
ring-buffer: Add cast to unsigned long addr passed to virt_to_page()
The sub-buffer pages are held in an unsigned long array, and when it is passed to virt_to_page() a cast is needed. Link: https://lore.kernel.org/all/20240515124808.06279d04@canb.auug.org.au/ Link: https://lore.kernel.org/linux-trace-kernel/20240515010558.4abaefdd@rorschach.local.home Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Fixes: 117c392 ("ring-buffer: Introducing ring-buffer mapping functions") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent fe832be commit b9c6820

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/ring_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6283,7 +6283,7 @@ static int __rb_map_vma(struct ring_buffer_per_cpu *cpu_buffer,
62836283
}
62846284

62856285
while (p < nr_pages) {
6286-
struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]);
6286+
struct page *page = virt_to_page((void *)cpu_buffer->subbuf_ids[s]);
62876287
int off = 0;
62886288

62896289
if (WARN_ON_ONCE(s >= nr_subbufs)) {

0 commit comments

Comments
 (0)