KAMEZAWA Hiroyuki e00e431612 memcg: fix wrong pointer initialization at page migration when memcg is disabled.
Lee Schermerhorn reported that he saw bad pointer dereference in
mem_cgroup_end_migration() when he disabled memcg by boot option.

memcg's page migration logic works as

	mem_cgroup_prepare_migration(page, &ptr);
	do page migration
	mem_cgroup_end_migration(page, ptr);

Now, ptr is not initialized in prepare_migration when memcg is disabled
by boot option. This causes panic in end_migration. This patch fixes it.

Reported-by: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-12 07:25:56 -08:00
..
2009-04-01 08:59:13 -07:00
2009-06-16 19:47:28 -07:00
2009-09-22 07:17:41 -07:00
2009-11-09 09:55:44 -08:00
2009-09-23 07:39:41 -07:00
2009-10-29 07:39:29 -07:00
2009-09-22 07:17:35 -07:00
2009-09-22 07:17:40 -07:00
2009-09-27 11:39:25 -07:00
2009-09-24 08:41:47 -04:00
2008-06-12 18:05:41 -07:00
2007-10-20 01:27:18 +02:00
2009-10-01 16:11:12 -07:00
2009-06-23 12:50:05 -07:00
2009-09-22 07:17:29 -07:00