Messages in this thread | | | Date | Wed, 15 Aug 2012 19:44:26 +0100 | From | Alan Cox <> | Subject | Re: yama_ptrace_access_check(): possible recursive locking detected |
| |
> It sounds like get_task_comm shouldn't have locking at all then? It > should just do a length-limited copy and make sure there is a trailing > 0-byte?
It has locking so that it has a consistent state and more importantly it has an accessor function
Directly accessing it is asking for bugs in future. If you hold the needed lock then just add an
__get_task_comm()
method that asserts the lock is held. That way the rest of the behaviour remains properly encapsulated for when someone changes it.
Alan
| |