lkml.org 
[lkml]   [2008]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing/stack-tracer: avoid races accessing file

* Török Edwin <edwintorok@gmail.com> wrote:

> ---
> kernel/trace/trace.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 4c3bd82..48d1536 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -1470,13 +1470,13 @@ static inline int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm,
> file = vma->vm_file;
> vmstart = vma->vm_start;
> }
> + if (file) {
> + ret = trace_seq_path(s, &file->f_path);
> + if (ret)
> + ret = trace_seq_printf(s, "[+0x%lx]", ip - vmstart);
> + }
> up_read(&mm->mmap_sem);
> }
> - if (file) {
> - ret = trace_seq_path(s, &file->f_path);
> - if (ret)
> - ret = trace_seq_printf(s, "[+0x%lx]", ip - vmstart);
> - }

applied to tip/tracing/stack-tracer, thanks Edwin!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-11-23 12:43    [W:0.095 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site