Re: [PATCH v4 3.0-rc2-tip 13/22] 13: uprobes: Handing int3 andsinglestep exception.

From: Stephen Wilson
Date: Wed Jun 08 2011 - 18:12:44 EST




On Tue, Jun 07, 2011 at 06:30:51PM +0530, Srikar Dronamraju wrote:
> +/*
> + * uprobe_post_notifier gets called in interrupt context.
> + * It completes the single step operation.
> + */
> +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?


--
steve

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