[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210401162520.57a0366c@gandalf.local.home>
Date: Thu, 1 Apr 2021 16:25:20 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] ftrace: Check if pages were allocated before calling
free_pages()
On Thu, 1 Apr 2021 16:07:10 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> > @@ -6231,7 +6231,8 @@ static int ftrace_process_locs(struct module *mod,
> > if (!addr)
> > continue;
> >
> > - if (pg->index == pg->size) {
> > + end_offset = (pg->index+1) * sizeof(pg->records[0]);
> > + if (end_offset < PAGE_SIZE << pg->order) {
>
> I believe that needs to be:
>
> if (end_offset >= PAGE_SIZE << pg->order) {
>
> But as you said, you didn't test it. I'll look to see what else needs to be
> fixed.
After making the above change, it appears to work.
Want to give me your "Signed-off-by"?
-- Steve
Powered by blists - more mailing lists