Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Geyslan Gregório Bem
2013/10/19 Steven Rostedt : > On Sat, 19 Oct 2013 11:41:10 -0300 > Geyslan Gregório Bem wrote: > >> Let's wait Steve's reply about further use of tracing_is_disabled(). > > Might want to ping me later. This weekend I'm taking my daughter to > colleges, and early Monday morning I'm leaving to

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Steven Rostedt
On Sat, 19 Oct 2013 11:41:10 -0300 Geyslan Gregório Bem wrote: > Let's wait Steve's reply about further use of tracing_is_disabled(). Might want to ping me later. This weekend I'm taking my daughter to colleges, and early Monday morning I'm leaving to Edinburgh (arriving on Tuesday). -- Steve

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Geyslan Gregório Bem
2013/10/19 Oleg Nesterov : > On 10/19, Geyslan Gregório Bem wrote: >> >> 2013/10/19 Oleg Nesterov : >> > On 10/17, Steven Rostedt wrote: >> >> >> >> 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 >> >>

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Oleg Nesterov
On 10/19, Geyslan Gregório Bem wrote: > > 2013/10/19 Oleg Nesterov : > > On 10/17, Steven Rostedt wrote: > >> > >> 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

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Geyslan Gregório Bem
2013/10/19 Oleg Nesterov : > 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

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Oleg Nesterov
Steven, et all, sorry for off-topic... You probably know that kernel/trace/ is not trivial ;) and the fact that cscope doesn't shows the callers in kernel/trace/trace_events.c doesn't really help. Fixed by the patch below, but I am not sure it is fine to uglify the code to help the buggy tools.

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Oleg Nesterov
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

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Oleg Nesterov
On 10/17, Steven Rostedt wrote: On Thu, 17 Oct 2013 22:44:56 -0300 Geyslan G. Bem geys...@gmail.com 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

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Oleg Nesterov
Steven, et all, sorry for off-topic... You probably know that kernel/trace/ is not trivial ;) and the fact that cscope doesn't shows the callers in kernel/trace/trace_events.c doesn't really help. Fixed by the patch below, but I am not sure it is fine to uglify the code to help the buggy tools.

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Geyslan Gregório Bem
2013/10/19 Oleg Nesterov o...@redhat.com: On 10/17, Steven Rostedt wrote: On Thu, 17 Oct 2013 22:44:56 -0300 Geyslan G. Bem geys...@gmail.com wrote: and fix the possible 'dir' assignment after freeing it. This should be safe afaics, nobody will use it anyway. Even subsystem_release()

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Oleg Nesterov
On 10/19, Geyslan Gregório Bem wrote: 2013/10/19 Oleg Nesterov o...@redhat.com: On 10/17, Steven Rostedt wrote: 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

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Geyslan Gregório Bem
2013/10/19 Oleg Nesterov o...@redhat.com: On 10/19, Geyslan Gregório Bem wrote: 2013/10/19 Oleg Nesterov o...@redhat.com: On 10/17, Steven Rostedt wrote: I'm thinking of just nuking the tracing_open_generic() here. The only thing it does here is the tracing_disabled check. The

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Steven Rostedt
On Sat, 19 Oct 2013 11:41:10 -0300 Geyslan Gregório Bem geys...@gmail.com wrote: Let's wait Steve's reply about further use of tracing_is_disabled(). Might want to ping me later. This weekend I'm taking my daughter to colleges, and early Monday morning I'm leaving to Edinburgh (arriving on

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-19 Thread Geyslan Gregório Bem
2013/10/19 Steven Rostedt rost...@goodmis.org: On Sat, 19 Oct 2013 11:41:10 -0300 Geyslan Gregório Bem geys...@gmail.com wrote: Let's wait Steve's reply about further use of tracing_is_disabled(). Might want to ping me later. This weekend I'm taking my daughter to colleges, and early Monday

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-18 Thread Steven Rostedt
On Fri, 18 Oct 2013 08:02:32 -0300 Geyslan Gregório Bem wrote: > >> > >> 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 as it just > >>

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-18 Thread Geyslan Gregório Bem
2013/10/18 Geyslan Gregório Bem : > 2013/10/17 Steven Rostedt : >> On Thu, 17 Oct 2013 22:44:56 -0300 >> "Geyslan G. Bem" wrote: >> >>> Restructures function logic conditions testing 'tracing_open_generic' >>> return before the others. It avoids: unnecessary trace_array_get and >>> kzalloc when

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-18 Thread Geyslan Gregório Bem
2013/10/17 Steven Rostedt : > On Thu, 17 Oct 2013 22:44:56 -0300 > "Geyslan G. Bem" wrote: > >> Restructures function logic conditions testing 'tracing_open_generic' >> return before the others. It avoids: unnecessary trace_array_get and >> kzalloc when tracing is disabled; and fix the possible

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-18 Thread Geyslan Gregório Bem
2013/10/17 Steven Rostedt rost...@goodmis.org: On Thu, 17 Oct 2013 22:44:56 -0300 Geyslan G. Bem geys...@gmail.com wrote: Restructures function logic conditions testing 'tracing_open_generic' return before the others. It avoids: unnecessary trace_array_get and kzalloc when tracing is

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-18 Thread Geyslan Gregório Bem
2013/10/18 Geyslan Gregório Bem geys...@gmail.com: 2013/10/17 Steven Rostedt rost...@goodmis.org: On Thu, 17 Oct 2013 22:44:56 -0300 Geyslan G. Bem geys...@gmail.com wrote: Restructures function logic conditions testing 'tracing_open_generic' return before the others. It avoids: unnecessary

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-18 Thread Steven Rostedt
On Fri, 18 Oct 2013 08:02:32 -0300 Geyslan Gregório Bem geys...@gmail.com wrote: 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 as it just

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-17 Thread Steven Rostedt
On Thu, 17 Oct 2013 22:44:56 -0300 "Geyslan G. Bem" wrote: > Restructures function logic conditions testing 'tracing_open_generic' > return before the others. It avoids: unnecessary trace_array_get and > kzalloc when tracing is disabled; and fix the possible 'dir' > assignment after freeing it.

Re: [PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-17 Thread Steven Rostedt
On Thu, 17 Oct 2013 22:44:56 -0300 Geyslan G. Bem geys...@gmail.com wrote: Restructures function logic conditions testing 'tracing_open_generic' return before the others. It avoids: unnecessary trace_array_get and kzalloc when tracing is disabled; and fix the possible 'dir' assignment after