From: Dan Carpenter <error27@gmail.com>
To: Vincent Donnefort <vdonnefort@google.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: [bug report] ring-buffer: Introduce ring-buffer remotes
Date: Fri, 10 Apr 2026 13:16:27 +0300 [thread overview]
Message-ID: <adjN-1ydA_kPPhmG@stanley.mountain> (raw)
Hello Vincent Donnefort,
Commit 2e67fabd8b77 ("ring-buffer: Introduce ring-buffer remotes")
from Mar 9, 2026 (linux-next), leads to the following Smatch static
checker warning:
kernel/trace/ring_buffer.c:2243 ring_buffer_desc_page()
warn: array off by one? 'desc->page_va[page_id]'
kernel/trace/ring_buffer.c
2241 static void *ring_buffer_desc_page(struct ring_buffer_desc *desc, int page_id)
2242 {
--> 2243 return page_id > desc->nr_page_va ? NULL : (void *)desc->page_va[page_id];
^
Based on the len = struct_size(desc, page_va, desc->nr_page_va), in
ring_buffer_desc(), I'm pretty sure this should be >= instead of >.
2244 }
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
next reply other threads:[~2026-04-10 10:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 10:16 Dan Carpenter [this message]
2026-04-10 12:46 ` [bug report] ring-buffer: Introduce ring-buffer remotes Vincent Donnefort
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adjN-1ydA_kPPhmG@stanley.mountain \
--to=error27@gmail.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=vdonnefort@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.