[PATCH 23] ptrace_attach_task: kill WARN_ON(err) (perhars we can improve ->reporting logic?)
Roland McGrath
roland at redhat.com
Sat Sep 5 01:53:12 UTC 2009
> ptrace_attach_task:
>
> engine = utrace_attach_task(CREATE | EXCLUSIVE);
>
> err = utrace_set_events();
> WARN_ON(err && !tracee->exit_state);
>
> Looks correct but it is not. utrace_attach_task() can return EINPROGRESS.
utrace_set_events() can, yes. I think the old code just predates
utrace_barrier() et al. That can just be:
if (err && err != -EINPROGRESS)
WARN_ON(!tracee->exit_state);
to keep the sanity check.
> Note that start_callback/etc sets ->reporting = engine even if we are not
> going to call ->report_any(). I'll try to think, perhaps we can change this
> code to check engine->flags first...
I think the barrier logic in start_callback() won't allow that.
> Note that EINPROGRESS can happen even if there are no other tracers.
That's fine. It just means "not synchronized yet". I suppose we could
make utrace_set_events() skip it when it's not clearing any bits.
> But the real problem is, _sometimes_ "make xcheck" triggers this warning,
> and I can not understand:
>
> 1. Why I didn't see it before context->options was added
>
> 2. I changed utrace_resume() to check QUIESCE. But I still
> see the warning!
>
> Still investigating...
I don't have any answers to those off hand.
Thanks,
Roland
More information about the utrace-devel
mailing list