lkml.org 
[lkml]   [2024]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linus:master] [eventfs] 852e46e239: BUG:unable_to_handle_page_fault_for_address
On Wed, 31 Jan 2024 11:13:58 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 31 Jan 2024 10:58:47 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > @@ -788,6 +717,7 @@ static void init_once(void *foo)
> > {
> > struct tracefs_inode *ti = (struct tracefs_inode *) foo;
> >
> > + memset(ti, 0, sizeof(*ti));
> > inode_init_once(&ti->vfs_inode);
> > }
> >
>
> Note, that inode_init_once() also does a memset on the entire inode, so the
> initial memset is redundant on the inode portion. But I didn't think it was
> really worth the time to complicate the code by optimizing it. I guess if I
> changed the structure to:
>
> struct tracefs_inode {
> + struct inode vfs_inode;
> unsigned long flags;
> void *private;
> - struct inode vfs_inode;
> };
>
> I could have it do:
>
> memset_after(ti, 0, vfs_inode);
>
> But this can be done as a separate clean up and doesn't need to be done now.
>

Hmm, since I need to run all the tests again, I think I'll change this
patch to do the above.

-- Steve

\
 
 \ /
  Last update: 2024-05-27 14:43    [W:0.382 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site