[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240515103102.08c0fdb9@rorschach.local.home>
Date: Wed, 15 May 2024 10:31:02 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Stephen Rothwell <sfr@...b.auug.org.au>,
Vincent Donnefort <vdonnefort@...gle.com>
Subject: [for-next][PATCH] ring-buffer: Add cast to unsigned long addr
passed to virt_to_page()
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
ring-buffer/for-next
Head SHA1: b9c6820f029abaabbc37646093866aa730ca0928
Steven Rostedt (Google) (1):
ring-buffer: Add cast to unsigned long addr passed to virt_to_page()
----
kernel/trace/ring_buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit b9c6820f029abaabbc37646093866aa730ca0928
Author: Steven Rostedt (Google) <rostedt@...dmis.org>
Date: Wed May 15 01:05:58 2024 -0400
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@...nel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Fixes: 117c39200d9d ("ring-buffer: Introducing ring-buffer mapping functions")
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index a02c7a52a0f5..7345a8b625fb 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -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)) {
Powered by blists - more mailing lists