[lkml]   [2013]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] tracing: fix referencing after memory freeing and refactors code
On 10/17, Steven Rostedt wrote:
> On Thu, 17 Oct 2013 22:44:56 -0300
> "Geyslan G. Bem" <> wrote:
> > and fix the possible 'dir'
> > assignment after freeing it.

This should be safe afaics, nobody will use it anyway. Even
subsystem_release() won't be called if .open() fails. But I agree
this doesn't look good.

> I'm thinking of just nuking the tracing_open_generic() here. The only
> thing it does here is the tracing_disabled check. The assignment of
> inode->i_private to filp->private_data is pointless

The same for ftrace_enable_fops() and ftrace_event_filter_fops() at
least. The users of event_file_data() do not use ->private_data.

OTOH, say, trace_format_open() doesn't check tracing_disabled, so

> We could add a tracing_is_disabled() function to test instead.

perhaps it can have more callers.


 \ /
  Last update: 2013-10-19 15:01    [W:0.093 / U:4.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site