On Fri, 04 May 2001 07:34:20 -0500,
Todd Inglett <tinglett@vnet.ibm.com> wrote:
>But this is where hell breaks loose. Every process has a valid parent
>-- unless it is dead and nobody cares. Process N has already exited and
>released from the tasklist while its parent was still alive. There was
>no reason to reparent it. It just got released. So N's task_struct has
>a dangling ptr to its parent. Nobody is holding the parent task_struct,
>either. When the parent died memory for its task_struct was released.
>This is ungood.
Wrap the reference to the parent task structure with exception table
recovery code, like copy_from_user(). If the dangling reference points
to valid memory the worst that will happen is that you read and report
gibberish for one output. If the reference causes an exception then
recover and treat it as NULL. For a read only case, the only important
thing is not to die, one occurrence of bad data is tolerable.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:19 EST