lkml.org 
[lkml]   [2011]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 3.0-rc2-tip 13/22] 13: uprobes: Handing int3 and singlestep exception.
> > + */
> > +int uprobe_post_notifier(struct pt_regs *regs)
> > +{
> > + struct uprobe *uprobe;
> > + struct uprobe_task *utask;
> > +
> > + if (!current->mm || !current->utask || !current->utask->active_uprobe)
> > + /* task is currently not uprobed */
> > + return 0;
> > +
> > + utask = current->utask;
> > + uprobe = utask->active_uprobe;
> > + if (!uprobe)
> > + return 0;
> > +
> > + set_thread_flag(TIF_UPROBE);
> > + return 1;
> > +}
>
> Looks like this can be simplified. If current->utask->active_uprobe is
> non-null then surely the assignment to uprobe will be too?
>

Yes, the two lines where we check for !uprobe and return are redundant
and can be removed. Will be corrected in the next patchset.

--
Thanks and Regards
Srikar


\
 
 \ /
  Last update: 2011-06-09 07:57    [W:0.528 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site