Re: [PATCH] mm: bugfix: set current->reclaim_state to NULL whilereturning from kswapd()

From: David Rientjes
Date: Mon Nov 05 2012 - 16:44:25 EST


On Tue, 6 Nov 2012, Aaditya Kumar wrote:

> From: Takamori Yamaguchi <takamori.yamaguchi@xxxxxxxxxxx>
>
> In kswapd(), set current->reclaim_state to NULL before returning, as
> current->reclaim_state holds reference to variable on kswapd()'s stack.
>
> In rare cases, while returning from kswapd() during memory off lining,
> __free_slab() can access dangling pointer of current->reclaim_state.
>

It's __free_slab() for slub and kmem_freepages() for slab.

> Signed-off-by: Takamori Yamaguchi <takamori.yamaguchi@xxxxxxxxxxx>
> Signed-off-by: Aaditya Kumar <aaditya.kumar@xxxxxxxxxxx>

Acked-by: David Rientjes <rientjes@xxxxxxxxxx>
--
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/