From: Steven Rostedt <rostedt@goodmis.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>, <linux-kernel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH -next] ring-buffer: Fix ring buffer size in rb_write_something
Date: Mon, 25 Mar 2019 21:36:07 -0400 [thread overview]
Message-ID: <20190325213607.74a62138@oasis.local.home> (raw)
In-Reply-To: <1537704693-184237-1-git-send-email-yuehaibing@huawei.com>
On Sun, 23 Sep 2018 12:11:33 +0000
YueHaibing <yuehaibing@huawei.com> wrote:
> 'cnt' should be used to calculate ring buffer size rather than data->cnt
I just found this patch in my inbox (was traveling at the time. But now
I have patchwork attached to my INBOX so patches like these shouldn't
be missed anymore!)
Yes, you are correct, this should be fixed. But as it is just for a
startup test, I'll queue it for the next merge window.
Thanks and sorry for the delay.
-- Steve
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> kernel/trace/ring_buffer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index 65bd461..53538c3 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -4924,7 +4924,7 @@ static __init int rb_write_something(struct
> rb_test_data *data, bool nested) cnt = data->cnt + (nested ? 27 : 0);
>
> /* Multiply cnt by ~e, to make some unique increment */
> - size = (data->cnt * 68 / 25) % (sizeof(rb_string) - 1);
> + size = (cnt * 68 / 25) % (sizeof(rb_string) - 1);
>
> len = size + sizeof(struct rb_item);
>
>
>
prev parent reply other threads:[~2019-03-26 1:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-23 12:11 YueHaibing
2019-03-26 1:36 ` Steven Rostedt [this message]
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=20190325213607.74a62138@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=yuehaibing@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®