Re: [PATCH] mm, oom: Fix race when selecting process to kill

From: Vladimir Murzin
Date: Tue Nov 05 2013 - 22:00:47 EST


Ccing Oleg and Sergey

On Tue, Nov 05, 2013 at 05:27:29PM -0800, David Rientjes wrote:
> On Tue, 5 Nov 2013, Luigi Semenzato wrote:
>
> > It's not enough to hold a reference to the task struct, because it can
> > still be taken out of the circular list of threads. The RCU
> > assumptions don't hold in that case.
> >
>
> Could you please post a proper bug report that isolates this at the cause?
>
Hi David!

I think it has already been reported[1] and actively discussed. Oleg has
confirmed that while_each_thread() is not safe under rcu_read_lock()[2].

Oleg, any news about your activity for fixing that?

[1] http://www.spinics.net/lists/linux-mm/msg54836.html
[2] http://marc.info/?l=linux-kernel&m=127688978121665
> Thanks.
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@xxxxxxxxxx For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>
--
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/