]> Git Repo - linux.git/commitdiff
ring-buffer: Add cast to unsigned long addr passed to virt_to_page()
authorSteven Rostedt (Google) <[email protected]>
Wed, 15 May 2024 05:05:58 +0000 (01:05 -0400)
committerSteven Rostedt (Google) <[email protected]>
Wed, 15 May 2024 05:28:42 +0000 (01:28 -0400)
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/[email protected]/
Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Fixes: 117c39200d9d ("ring-buffer: Introducing ring-buffer mapping functions")
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
kernel/trace/ring_buffer.c

index a02c7a52a0f5b2cb6e4d93448466f510bc517644..7345a8b625fb8da7da5ab47023240d42296c7508 100644 (file)
@@ -6283,7 +6283,7 @@ static int __rb_map_vma(struct ring_buffer_per_cpu *cpu_buffer,
        }
 
        while (p < nr_pages) {
-               struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]);
+               struct page *page = virt_to_page((void *)cpu_buffer->subbuf_ids[s]);
                int off = 0;
 
                if (WARN_ON_ONCE(s >= nr_subbufs)) {
This page took 0.068018 seconds and 4 git commands to generate.