Re: [PATCH] sched: fix fork() error path to not crash.

From: Salman Qazi
Date: Tue Jun 26 2012 - 12:58:37 EST


On Tue, Jun 26, 2012 at 1:40 AM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> On Mon, 2012-06-25 at 18:18 -0700, Salman Qazi wrote:
>> In dup_task_struct, if arch_dup_task_struct fails, the clean up
>> code fails to clean up correctly.  That's because the clean up
>> code depends on unininitalized ti->task pointer.  We fix this
>> by making sure that the task and thread_info know about each other
>> before we attempt to take the error path.
>>
>> Signed-off-by: Salman Qazi <sqazi@xxxxxxxxxx>
>
> Cute, however did you find that?

Our test infrastructure folks have developed a fault injection
framework geared towards detecting bugs triggered by memory allocation
failures in random places.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/