Kirill A. Shutemov
112bc2e120
memcg: fix false positive VM_BUG on non-SMP
Fix this:
kernel BUG at mm/memcontrol.c:2155!
invalid opcode: 0000 [#1]
last sysfs file:
Pid: 18, comm: sh Not tainted 2.6.37-rc3 #3 /Bochs
EIP: 0060:[<c10731b2>] EFLAGS: 00000246 CPU: 0
EIP is at mem_cgroup_move_account+0xe2/0xf0
EAX: 00000004 EBX: c6f931d4 ECX: c681c300 EDX: c681c000
ESI: c681c300 EDI: ffffffea EBP: c681c000 ESP: c46f3e30
DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process sh (pid: 18, ti=c46f2000 task=c6826e60 task.ti=c46f2000)
Stack:
00000155 c681c000 0805f000 c46ee180 c46f3e5c c7058820 c1074d37 00000000
08060000 c46db9a0 c46ec080 c7058820 0805f000 08060000 c46f3e98 c1074c50
c106c75e c46f3e98 c46ec080 08060000 0805ffff c46db9a0 c46f3e98 c46e0340
Call Trace:
[<c1074d37>] ? mem_cgroup_move_charge_pte_range+0xe7/0x130
[<c1074c50>] ? mem_cgroup_move_charge_pte_range+0x0/0x130
[<c106c75e>] ? walk_page_range+0xee/0x1d0
[<c10725d6>] ? mem_cgroup_move_task+0x66/0x90
[<c1074c50>] ? mem_cgroup_move_charge_pte_range+0x0/0x130
[<c1072570>] ? mem_cgroup_move_task+0x0/0x90
[<c1042616>] ? cgroup_attach_task+0x136/0x200
[<c1042878>] ? cgroup_tasks_write+0x48/0xc0
[<c1041e9e>] ? cgroup_file_write+0xde/0x220
[<c101398d>] ? do_page_fault+0x17d/0x3f0
[<c108a79d>] ? alloc_fd+0x2d/0xd0
[<c1041dc0>] ? cgroup_file_write+0x0/0x220
[<c1077ba2>] ? vfs_write+0x92/0xc0
[<c1077c81>] ? sys_write+0x41/0x70
[<c1140e3d>] ? syscall_call+0x7/0xb
Code: 03 00 74 09 8b 44 24 04 e8 1c f1 ff ff 89 73 04 8d 86 b0 00 00 00 b9 01 00 00 00 89 da 31 ff e8 65 f5 ff ff e9 4d ff ff ff 0f 0b <0f> 0b 0f 0b 0f 0b 90 8d b4 26 00 00 00 00 83 ec 10 8b 0d f4 e3
EIP: [<c10731b2>] mem_cgroup_move_account+0xe2/0xf0 SS:ESP 0068:c46f3e30
---[ end trace 7daa1582159b6532 ]---
lock_page_cgroup and unlock_page_cgroup are implemented using
bit_spinlock. bit_spinlock doesn't touch the bit if we are on non-SMP
machine, so we can't use the bit to check whether the lock was taken.
Let's introduce is_page_cgroup_locked based on bit_spin_is_locked instead
of PageCgroupLocked to fix it.
[akpm@linux-foundation.org: s/is_page_cgroup_locked/page_is_cgroup_locked/]
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujtisu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-25 06:50:40 +09:00
..
2010-10-27 19:04:36 -07:00
2010-10-18 15:16:08 +02:00
2010-11-09 12:43:17 -08:00
2010-10-20 15:37:28 -07:00
2010-11-03 10:44:20 -07:00
2010-10-13 07:49:27 -07:00
2010-11-15 20:44:26 -05:00
2010-11-10 15:40:06 +00:00
2010-10-26 17:54:22 -07:00
2010-11-04 12:21:25 +09:00
2010-10-30 08:31:35 -07:00
2010-10-23 11:47:02 -07:00
2010-10-13 18:00:51 +02:00
2010-10-18 11:22:05 +02:00
2010-10-13 18:00:51 +02:00
2010-10-13 18:00:51 +02:00
2010-10-28 22:40:31 +01:00
2010-11-01 07:50:43 -04:00
2010-11-02 17:13:52 -04:00
2010-11-05 14:13:32 +02:00
2010-10-15 21:18:59 +02:00
2010-10-26 14:51:00 -04:00
2010-10-22 10:20:08 -07:00
2010-10-21 20:21:03 -04:00
2010-09-23 14:33:39 -07:00
2010-11-12 07:55:30 -08:00
2010-10-30 08:45:43 -04:00
2010-10-26 16:52:10 -07:00
2010-10-27 18:03:06 -07:00
2010-10-25 04:54:25 -04:00
2010-11-10 14:54:09 +01:00
2010-10-09 21:51:45 +02:00
2010-11-10 14:54:09 +01:00
2010-11-10 14:54:09 +01:00
2010-10-25 21:18:20 -04:00
2010-10-27 18:03:09 -07:00
2010-10-25 08:02:40 -07:00
2010-10-25 08:02:40 -07:00
2010-10-25 08:02:40 -07:00
2010-09-14 16:08:45 -07:00
2010-10-26 17:32:41 -07:00
2010-10-24 14:20:01 -07:00
2010-10-14 14:32:06 -07:00
2010-09-30 21:19:22 -04:00
2010-09-24 07:40:30 -07:00
2010-10-28 10:27:00 -07:00
2010-10-22 10:16:43 -07:00
2010-09-07 14:17:10 -05:00
2010-09-22 17:22:38 -07:00
2010-10-07 17:08:32 -07:00
2010-10-21 14:23:48 -07:00
2010-10-14 18:38:42 +02:00
2010-10-14 18:38:20 +02:00
2010-10-22 15:55:22 +02:00
2010-10-22 17:03:12 -07:00
2010-10-21 14:47:59 +02:00
2010-10-24 22:06:02 +02:00
2010-09-23 14:33:39 -07:00
2010-10-21 01:26:54 -07:00
2010-10-23 09:24:34 +09:00
2010-10-28 17:22:16 -04:00
2010-10-27 18:03:08 -07:00
2010-10-18 11:03:14 +02:00
2010-11-25 06:50:38 +09:00
2010-10-22 10:22:17 -07:00
2010-11-15 13:49:51 +09:00
2010-10-28 17:22:16 -04:00
2010-10-30 14:07:40 -04:00
2010-09-09 20:46:30 +02:00
2010-09-14 00:23:59 -07:00
2010-10-24 22:06:02 +02:00
2010-10-26 16:52:10 -07:00
2010-10-25 14:11:37 -07:00
2010-11-18 10:56:29 -08:00
2010-10-23 22:49:32 +02:00
2010-09-24 14:03:44 +02:00
2010-11-12 07:55:30 -08:00
2010-10-12 16:53:37 +02:00
2010-10-08 09:32:46 +02:00
2010-11-15 22:40:38 +01:00
2010-11-15 22:40:38 +01:00
2010-10-26 17:40:56 -07:00
2010-10-11 15:04:21 -04:00
2010-10-05 20:26:58 -07:00
2010-10-18 11:03:14 +02:00
2010-09-21 18:04:47 -07:00
2010-11-12 12:30:57 -08:00
2010-10-21 16:08:28 +02:00
2010-09-30 21:16:05 -07:00
2010-10-27 18:03:12 -07:00
2010-10-22 10:21:26 -07:00
2010-11-03 11:04:46 -07:00
2010-10-07 15:03:44 -07:00
2010-09-07 11:16:43 +01:00
2010-10-27 18:48:00 -07:00
2010-10-26 16:52:08 -07:00
2010-11-11 13:40:11 +01:00
2010-10-26 15:33:31 -07:00
2010-10-04 22:45:24 +09:00
2010-10-21 16:08:28 +02:00
2010-10-18 19:58:50 +02:00
2010-10-26 10:33:27 +02:00
2010-10-12 16:53:44 +02:00
2010-10-07 14:08:55 +01:00
2010-10-28 11:58:39 +02:00
2010-10-27 21:25:12 -04:00
2010-10-18 19:58:57 +02:00
2010-10-29 14:45:29 -04:00
2010-10-28 17:22:13 -04:00
2010-10-22 15:34:12 -05:00
2010-10-27 18:03:13 -07:00
2010-11-15 13:37:37 -08:00
2010-10-27 18:03:18 -07:00
2010-10-29 13:14:41 -05:00
2010-10-22 10:16:44 -07:00
2010-09-09 18:57:24 -07:00
2010-10-24 12:47:25 -07:00
2010-10-24 10:50:49 +02:00
2010-10-24 10:52:19 +02:00
2010-11-12 07:55:32 -08:00
2010-11-12 07:55:32 -08:00
2010-11-12 07:55:32 -08:00
2010-09-09 09:09:43 -07:00
2010-11-16 13:33:23 -08:00
2010-10-25 14:11:39 -07:00
2010-10-25 21:24:15 -04:00
2010-10-21 14:11:46 -07:00
2010-10-28 09:08:47 -05:00
2010-11-22 08:34:23 -08:00
2010-10-26 16:52:19 -07:00
2010-10-12 15:37:51 -07:00
2010-10-26 16:52:06 -07:00
2010-10-22 10:16:44 -07:00
2010-10-08 09:32:46 +02:00
2010-10-26 16:52:05 -07:00
2010-10-26 16:52:09 -07:00
2010-10-28 09:02:15 -07:00
2010-10-26 16:52:07 -07:00
2010-10-08 10:46:27 +02:00
2010-10-26 16:52:13 -07:00
2010-10-03 21:50:53 -07:00
2010-10-12 16:53:34 +02:00
2010-10-08 17:16:22 -05:00
2010-09-03 08:19:51 +02:00
2010-10-18 11:03:14 +02:00
2010-10-04 21:10:52 +02:00
2010-10-04 21:10:52 +02:00
2010-10-01 17:18:59 -04:00
2010-11-08 12:17:07 -08:00
2010-11-12 08:26:06 +01:00
2010-09-22 13:21:05 -07:00
2010-10-18 08:32:07 -07:00
2010-10-26 09:55:25 -07:00
2010-10-24 18:07:10 -04:00
2010-11-16 11:56:24 -05:00
2010-10-07 18:48:49 -04:00
2010-09-23 08:55:58 -04:00
2010-10-24 18:07:10 -04:00
2010-10-23 09:24:39 +09:00
2010-10-11 15:04:20 -04:00
2010-10-21 11:10:10 -06:00
2010-10-21 11:10:10 -06:00
2010-10-21 11:34:55 -06:00
2010-10-12 21:58:08 -06:00
2010-10-17 01:57:50 +02:00
2010-10-15 12:45:44 +02:00
2010-09-03 19:09:46 +08:00
2010-11-25 06:50:40 +09:00
2010-10-25 16:10:15 +02:00
2010-10-26 16:52:05 -07:00
2010-10-26 16:52:09 -07:00
2010-10-31 21:06:59 +01:00
2010-10-17 20:03:03 -07:00
2010-10-17 20:03:06 -07:00
2010-10-27 21:30:13 -04:00
2010-10-27 17:53:25 +02:00
2010-10-22 17:31:36 -07:00
2010-11-10 22:58:39 +01:00
2010-10-13 14:40:34 -07:00
2010-10-24 15:07:11 -07:00
2010-10-22 10:16:42 -07:00
2010-10-17 01:57:48 +02:00
2010-10-17 01:57:43 +02:00
2010-10-17 01:57:48 +02:00
2010-10-27 18:03:18 -07:00
2010-10-06 17:37:22 +04:00
2010-11-15 13:37:37 -08:00
2010-10-27 18:03:10 -07:00
2010-11-12 07:55:33 -08:00
2010-09-09 16:08:51 +02:00
2010-11-12 07:55:32 -08:00
2010-10-29 04:16:31 -04:00
2010-10-27 18:03:18 -07:00
2010-10-26 16:52:16 -07:00
2010-10-05 14:03:02 -07:00
2010-09-08 18:16:55 -07:00
2010-11-17 08:59:32 -08:00
2010-11-12 07:55:30 -08:00
2010-10-17 01:57:50 +02:00
2010-10-20 13:37:56 -04:00
2010-10-27 18:03:16 -07:00
2010-10-27 18:03:16 -07:00
2010-10-27 18:03:16 -07:00
2010-10-26 16:52:09 -07:00
2010-11-15 11:29:30 -08:00
2010-11-10 23:13:56 +01:00
2010-11-15 15:40:01 -08:00
2010-10-22 10:20:06 -07:00
2010-10-21 10:12:48 +11:00
2010-10-30 12:12:50 +02:00
2010-10-22 10:20:10 -07:00
2010-10-25 13:46:56 -07:00
2010-09-03 17:29:04 -07:00
2010-10-18 09:33:31 -07:00
2010-10-18 23:57:06 -04:00
2010-11-08 09:35:26 +09:00
2010-11-09 16:38:20 +09:00
2010-10-04 03:54:56 +09:00
2010-10-31 10:40:39 -04:00
2010-10-08 09:32:15 +02:00
2010-10-20 03:02:23 -07:00
2010-10-06 16:54:36 +03:00
2010-11-17 14:58:36 -08:00
2010-10-27 17:28:36 +01:00
2010-10-28 11:47:52 -07:00
2010-10-07 14:08:55 +01:00
2010-09-24 21:27:41 -07:00
2010-10-14 08:55:28 +02:00
2010-10-17 01:57:49 +02:00
2010-10-26 16:52:05 -07:00
2010-10-27 18:03:14 -07:00
2010-10-27 18:03:10 -07:00
2010-10-17 01:57:44 +02:00
2010-09-18 12:19:21 +02:00
2010-10-14 12:41:10 -07:00
2010-10-21 04:11:07 -07:00
2010-09-09 20:41:20 +02:00
2010-10-27 18:03:12 -07:00
2010-09-22 16:31:01 -04:00
2010-10-22 10:20:04 -07:00
2010-11-17 08:59:32 -08:00
2010-10-26 16:52:03 -07:00
2010-10-22 10:16:43 -07:00
2010-10-22 10:22:05 -07:00
2010-11-08 12:28:32 -08:00
2010-10-21 13:45:28 -02:00
2010-10-21 07:55:58 -02:00
2010-10-27 18:03:18 -07:00
2010-10-26 16:52:10 -07:00
2010-09-09 18:57:25 -07:00
2010-10-05 11:47:18 -07:00
2010-10-13 15:45:21 -04:00
2010-09-30 06:01:56 +03:00
2010-10-26 16:52:14 -07:00
2010-10-30 09:05:48 -07:00