OpenVZ Forum


Home » Mailing lists » Devel » [PATCH -utrace] Move utrace into task_struct
Re: [PATCH -utrace] Move utrace into task_struct [message #12744 is a reply to message #12732] Tue, 08 May 2007 14:34 Go to previous message
Alexey Dobriyan is currently offline  Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
Regardless of future of "struct utrace utrace;" patch looks like there
is another race: engine's flags and ops settings in utrace_detach() and
acting on them in report_quiescent():

utrace_detach() report_quiescent()
--------------- ------------------
[utrace lock held] [utrace lock is not held]

engine->flags = UTRACE_EVENT(QUIESCE) |
UTRACE_ACTION_QUIESCE;
if (engine->flags & UTRACE_EVENT(QUIESCE))
REPORT(report_quiesce);

rcu_assign_pointer(engine->ops, &dead_engine_ops);


At the moment of REPORT call engine's ops are still "live" ptrace ops
which do not have ->report_quiesce callback. So, there will oops while
calling function at NULL address. "Dead" ptrace engine ops do have dummy
callback but it wasn't yet glued.

I hit this once with "struct utrace utrace;" patch applied, but this
bug is also present in stock utrace, I'm sure.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [patch 049/455] Merge sys_clone()/sys_unshare() nsproxy and namespace handling
Next Topic: [PATCH 0/9] Containers (V9): Generic Process Containers
Goto Forum:
  


Current Time: Sat Sep 20 18:24:22 GMT 2025

Total time taken to generate the page: 0.05697 seconds