Re: [PATCH v5] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Google
On Tue, 12 Sep 2023 21:47:52 +0800 Jinjie Ruan wrote: > Inject fault while probing btrfs.ko, if kstrdup() fails in > eventfs_prepare_ef() in eventfs_add_dir(), it will return ERR_PTR > to assign file->ef. But the eventfs_remove() check NULL in > trace_module_remove_events(), which causes the

Re: [PATCH v5] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Steven Rostedt
On Tue, 12 Sep 2023 21:47:52 +0800 Jinjie Ruan wrote: > v5: > - Move the ef below dir to keep the "upside-down x-mas tree" format. That was quick! I'll add it to my queue and start testing it. Thanks Ruan! -- Steve

[PATCH v5] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Jinjie Ruan
Inject fault while probing btrfs.ko, if kstrdup() fails in eventfs_prepare_ef() in eventfs_add_dir(), it will return ERR_PTR to assign file->ef. But the eventfs_remove() check NULL in trace_module_remove_events(), which causes the below NULL pointer dereference. As both Masami and Steven suggest,

Re: [PATCH v4] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Steven Rostedt
On Tue, 12 Sep 2023 10:58:08 +0800 Jinjie Ruan wrote: This looks good. But I have a small nit. > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c > index ed367d713be0..8e0593d4c6a6 100644 > --- a/kernel/trace/trace_events.c > +++ b/kernel/trace/trace_events.c > @@ -2296,6