[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEtiSasbEXUeFwCNO09nT8TsEzLF-zZVyJ_pCO9V49hDPbpbAQ@mail.gmail.com>
Date: Tue, 6 Nov 2012 01:43:12 +0530
From: Aaditya Kumar <aaditya.kumar.30@...il.com>
To: LKML <linux-kernel@...r.kernel.org>, linux-mm@...ck.org
Cc: kosaki.motohiro@...fujitsu.com,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@...il.com>,
Mel Gorman <mel@....ul.ie>, akpm@...ux-foundation.org,
Minchan Kim <minchan.kim@...il.com>,
takamori.yamaguchi@...sony.com, takuzo.ohara@...sony.com,
amit.agarwal@...sony.com, tim.bird@...sony.com,
frank.rowand@...sony.com, kan.iibuchi@...sony.com,
aaditya.kumar@...sony.com
Subject: [PATCH] mm: bugfix: set current->reclaim_state to NULL while
returning from kswapd()
From: Takamori Yamaguchi <takamori.yamaguchi@...sony.com>
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 <takamori.yamaguchi@...sony.com>
Signed-off-by: Aaditya Kumar <aaditya.kumar@...sony.com>
---
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists