Takamori Yamaguchi b0a8cc58e6 mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()
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 offlining,
__free_slab() and freepages() can access the dangling pointer of
current->reclaim_state.

Signed-off-by: Takamori Yamaguchi <takamori.yamaguchi@jp.sony.com>
Signed-off-by: Aaditya Kumar <aaditya.kumar@ap.sony.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-11-09 06:41:47 +01:00
..
2012-10-09 16:22:54 +09:00
2012-05-29 23:28:33 -04:00
2012-01-03 22:54:56 -05:00
2012-10-09 16:23:03 +09:00
2011-07-26 16:49:47 -07:00
2012-10-09 16:23:03 +09:00
2012-10-09 16:23:03 +09:00
2012-07-31 18:42:43 -07:00
2010-05-21 18:31:21 -04:00
2012-10-09 16:22:54 +09:00
2012-10-09 16:22:24 +09:00
2012-07-31 18:42:43 -07:00
2012-06-20 14:39:36 -07:00
2012-06-20 14:39:36 -07:00
2012-07-31 18:42:49 -07:00
2012-10-09 16:22:55 +09:00
2012-10-09 16:23:03 +09:00
2012-10-09 16:22:59 +09:00