Messages in this thread | | | Date | Thu, 26 Jul 2012 19:38:41 +0200 | From | Sebastian Andrzej Siewior <> | Subject | Re: [PATCH] uprobes: don't enable/disable signle step if the user did it |
| |
On 07/26/2012 05:20 PM, Sebastian Andrzej Siewior wrote: > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c > index f935327..772eb3a 100644 > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -1528,7 +1528,10 @@ static void handle_swbp(struct pt_regs *regs) > > utask->state = UTASK_SSTEP; > if (!pre_ssout(uprobe, regs, bp_vaddr)) { > - user_enable_single_step(current); > + if (test_tsk_thread_flag(current, TIF_SINGLESTEP)) > + uprobe->flags |= UPROBE_USER_SSTEP; > + else > + user_enable_single_step(current);
After looking at it for a bit I noticed that the state should be saved in utask intead of uprobe because uprobe might be shared with another task. I would resend the fixed patch unless someone comes up with something else..
Sebastian
| |