From: Takamori Yamaguchi <[email protected]> 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. Signed-off-by: Takamori Yamaguchi <[email protected]> Signed-off-by: Aaditya Kumar <[email protected]> --- diff --git a/mm/vmscan.c b/mm/vmscan.c index 2624edc..8b055e9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3017,6 +3017,8 @@ static int kswapd(void *p) &balanced_classzone_idx); } } + + current->reclaim_state = NULL; return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

