* [memcg BUG] NULL pointer dereference wheng rmdir
@ 2009-01-19 9:15 Li Zefan
2009-01-19 9:33 ` KAMEZAWA Hiroyuki
2009-01-19 9:55 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems KAMEZAWA Hiroyuki
0 siblings, 2 replies; 10+ messages in thread
From: Li Zefan @ 2009-01-19 9:15 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki, Balbir Singh; +Cc: Daisuke Nishimura, linux-mm@kvack.org
I tested it on IA64, below are the steps to reproduce the bug:
# mount -t cgroup -o memory xxx /mnt
# mkdir /mnt/0
# for pid in `cat /mnt/tasks`; do echo $pid > /mnt/0/tasks; done
# for pid in `cat /mnt/0/tasks`; do echo $pid > /mnt/tasks; done
# rmdir /mnt/0
===========================================================================
Unable to handle kernel NULL pointer dereference (address 0000000000002680)
rmdir[11520]: Oops 8821862825984 [1]
Modules linked in: autofs4 sunrpc ipmi_watchdog ipmi_devintf ipmi_si ipmi_msghandler vfat fat dm_mirror dm_region_hash dm_log dm_multipath dm_mod rng_core e100 iTCO_wdt mii iTCO_vendor_support button sg usb_storage lpfc scsi_transport_fc shpchp mptspi mptscsih mptbase scsi_transport_spi sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: ipmi_watchdog]
Pid: 11520, CPU 1, comm: rmdir
psr : 00001010085a2010 ifs : 8000000000000001 ip : [<a0000001002ca020>] Not tainted (2.6.29-rc2-mm1-FOR_BISECT)
ip is at _raw_spin_trylock+0x20/0x80
unat: 0000000000000000 pfs : 0000000000000286 rsc : 0000000000000003
rnat: 0000000000555659 bsps: a000000100190380 pr : 000000000055a699
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c8a70033f
csd : 0000000000000000 ssd : 0000000000000000
b0 : a0000001006035c0 b6 : a000000100016760 b7 : a00000010000bae0
f6 : 1003e6b6b6b6b6b6b6b6b f7 : 0ffe8b01d00cce0000000
f8 : 1003e0000000000003bf0 f9 : 1003efffffffffffffbb8
f10 : 10002dffffffff5b74c91 f11 : 1003e0000000000000000
r1 : a000000100dc48c0 r2 : 0000000000000001 r3 : ffffffffffffffff
r8 : 0000000000000010 r9 : 0000000000004000 r10 : 0000000000000001
r11 : 0000000000000000 r12 : e0000040cabbfd90 r13 : e0000040cabb0000
r14 : e0000040cabb0e98 r15 : 0000000000000001 r16 : e000012085df54b8
r17 : e000012085df5468 r18 : e000012085df5468 r19 : 0000000000000000
r20 : 0000000000000000 r21 : 0000000000000000 r22 : 0000000000000000
r23 : e000012085df5468 r24 : e0000000011e2f88 r25 : e000012085b20238
r26 : 0000000000000080 r27 : e0000000011e2f08 r28 : e000012085b201a0
r29 : 0000000000000000 r30 : e0000000011e2f00 r31 : 0000000000000000
Call Trace:
[<a000000100015c00>] show_stack+0x40/0xa0
sp=e0000040cabbf960 bsp=e0000040cabb1238
[<a000000100016510>] show_regs+0x850/0x8a0
sp=e0000040cabbfb30 bsp=e0000040cabb11d8
[<a000000100039f50>] die+0x230/0x360
sp=e0000040cabbfb30 bsp=e0000040cabb1190
[<a000000100609a20>] ia64_do_page_fault+0xa00/0xb60
sp=e0000040cabbfb30 bsp=e0000040cabb1140
[<a00000010000c2e0>] ia64_native_leave_kernel+0x0/0x280
sp=e0000040cabbfbc0 bsp=e0000040cabb1140
[<a0000001002ca020>] _raw_spin_trylock+0x20/0x80
sp=e0000040cabbfd90 bsp=e0000040cabb1138
[<a0000001006035c0>] _spin_lock_irqsave+0x60/0x1a0
sp=e0000040cabbfd90 bsp=e0000040cabb1110
[<a00000010019db10>] mem_cgroup_force_empty+0x1f0/0xd60
sp=e0000040cabbfd90 bsp=e0000040cabb1070
[<a0000001001a0fb0>] mem_cgroup_pre_destroy+0x30/0x60
sp=e0000040cabbfda0 bsp=e0000040cabb1048
[<a0000001000edb50>] cgroup_rmdir+0x150/0x8e0
sp=e0000040cabbfda0 bsp=e0000040cabb1008
[<a0000001001bbdd0>] vfs_rmdir+0x110/0x1e0
sp=e0000040cabbfda0 bsp=e0000040cabb0fc0
[<a0000001001bfaf0>] do_rmdir+0x170/0x240
sp=e0000040cabbfda0 bsp=e0000040cabb0f88
[<a0000001001bfc90>] sys_rmdir+0x30/0x60
sp=e0000040cabbfe30 bsp=e0000040cabb0f30
[<a00000010000c090>] ia64_trace_syscall+0xf0/0x130
sp=e0000040cabbfe30 bsp=e0000040cabb0f30
[<a000000000010720>] __kernel_syscall_via_break+0x0/0x20
sp=e0000040cabc0000 bsp=e0000040cabb0f30
note: rmdir[11520] exited with preempt_count 1
===========================================================================
And I've confirmed it's because (zone == NULL) in mem_cgroup_force_empty_list():
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [memcg BUG] NULL pointer dereference wheng rmdir
2009-01-19 9:15 [memcg BUG] NULL pointer dereference wheng rmdir Li Zefan
@ 2009-01-19 9:33 ` KAMEZAWA Hiroyuki
2009-01-19 9:45 ` Li Zefan
2009-01-19 9:59 ` Balbir Singh
2009-01-19 9:55 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems KAMEZAWA Hiroyuki
1 sibling, 2 replies; 10+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-01-19 9:33 UTC (permalink / raw)
To: Li Zefan; +Cc: Balbir Singh, Daisuke Nishimura, linux-mm@kvack.org
On Mon, 19 Jan 2009 17:15:05 +0800
Li Zefan <lizf@cn.fujitsu.com> wrote:
> note: rmdir[11520] exited with preempt_count 1
> ===========================================================================
>
>
> And I've confirmed it's because (zone == NULL) in mem_cgroup_force_empty_list():
>
>
Hmm, curious. it will be
==
for_each_node_state(nid, N_POSSIBLE)
for (zid = 0; zid < MAX_NR_ZONES; zid++)
zone = &NODE_DATA(nid)->node_zones[zid];
==
And, from this message,
Unable to handle kernel NULL pointer dereference (address 0000000000002680)
NODE_DATA(nid) seems to be NULL.
Hmm...could you try this ? Thank you for nice test, very helpful.
-Kame
==
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
N_POSSIBLE doesn't means there is memory...and force_empty can
visit invalud node which have no pgdat.
To visit all valid nodes, N_HIGH_MEMRY should be used.
Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
===================================================================
--- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
+++ mmotm-2.6.29-Jan16/mm/memcontrol.c
@@ -1724,7 +1724,7 @@ move_account:
/* This is for making all *used* pages to be on LRU. */
lru_add_drain_all();
ret = 0;
- for_each_node_state(node, N_POSSIBLE) {
+ for_each_node_state(node, N_HIGH_MEMORY) {
for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
enum lru_list l;
for_each_lru(l) {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [memcg BUG] NULL pointer dereference wheng rmdir
2009-01-19 9:33 ` KAMEZAWA Hiroyuki
@ 2009-01-19 9:45 ` Li Zefan
2009-01-19 9:49 ` KAMEZAWA Hiroyuki
2009-01-19 9:59 ` Balbir Singh
1 sibling, 1 reply; 10+ messages in thread
From: Li Zefan @ 2009-01-19 9:45 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki; +Cc: Balbir Singh, Daisuke Nishimura, linux-mm@kvack.org
KAMEZAWA Hiroyuki wrote:
> On Mon, 19 Jan 2009 17:15:05 +0800
> Li Zefan <lizf@cn.fujitsu.com> wrote:
>
>> note: rmdir[11520] exited with preempt_count 1
>> ===========================================================================
>>
>>
>> And I've confirmed it's because (zone == NULL) in mem_cgroup_force_empty_list():
>>
>>
> Hmm, curious. it will be
>
> ==
> for_each_node_state(nid, N_POSSIBLE)
> for (zid = 0; zid < MAX_NR_ZONES; zid++)
> zone = &NODE_DATA(nid)->node_zones[zid];
>
> ==
>
> And, from this message,
>
> Unable to handle kernel NULL pointer dereference (address 0000000000002680)
>
> NODE_DATA(nid) seems to be NULL.
>
> Hmm...could you try this ? Thank you for nice test, very helpful.
The patch fixes the bug. :)
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
> -Kame
> ==
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> N_POSSIBLE doesn't means there is memory...and force_empty can
> visit invalud node which have no pgdat.
>
> To visit all valid nodes, N_HIGH_MEMRY should be used.
>
> Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> ---
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
> ===================================================================
> --- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
> +++ mmotm-2.6.29-Jan16/mm/memcontrol.c
> @@ -1724,7 +1724,7 @@ move_account:
> /* This is for making all *used* pages to be on LRU. */
> lru_add_drain_all();
> ret = 0;
> - for_each_node_state(node, N_POSSIBLE) {
> + for_each_node_state(node, N_HIGH_MEMORY) {
> for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
> enum lru_list l;
> for_each_lru(l) {
>
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [memcg BUG] NULL pointer dereference wheng rmdir
2009-01-19 9:45 ` Li Zefan
@ 2009-01-19 9:49 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 10+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-01-19 9:49 UTC (permalink / raw)
To: Li Zefan; +Cc: Balbir Singh, Daisuke Nishimura, linux-mm@kvack.org
On Mon, 19 Jan 2009 17:45:44 +0800
Li Zefan <lizf@cn.fujitsu.com> wrote:
> KAMEZAWA Hiroyuki wrote:
> > On Mon, 19 Jan 2009 17:15:05 +0800
> > Li Zefan <lizf@cn.fujitsu.com> wrote:
> >
> >> note: rmdir[11520] exited with preempt_count 1
> >> ===========================================================================
> >>
> >>
> >> And I've confirmed it's because (zone == NULL) in mem_cgroup_force_empty_list():
> >>
> >>
> > Hmm, curious. it will be
> >
> > ==
> > for_each_node_state(nid, N_POSSIBLE)
> > for (zid = 0; zid < MAX_NR_ZONES; zid++)
> > zone = &NODE_DATA(nid)->node_zones[zid];
> >
> > ==
> >
> > And, from this message,
> >
> > Unable to handle kernel NULL pointer dereference (address 0000000000002680)
> >
> > NODE_DATA(nid) seems to be NULL.
> >
> > Hmm...could you try this ? Thank you for nice test, very helpful.
>
> The patch fixes the bug. :)
>
> Tested-by: Li Zefan <lizf@cn.fujitsu.com>
>
Thx, I'll forward to Andrew Morton.
-Kame
> > -Kame
> > ==
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> >
> > N_POSSIBLE doesn't means there is memory...and force_empty can
> > visit invalud node which have no pgdat.
> >
> > To visit all valid nodes, N_HIGH_MEMRY should be used.
> >
> > Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> >
> > ---
> > mm/memcontrol.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
> > ===================================================================
> > --- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
> > +++ mmotm-2.6.29-Jan16/mm/memcontrol.c
> > @@ -1724,7 +1724,7 @@ move_account:
> > /* This is for making all *used* pages to be on LRU. */
> > lru_add_drain_all();
> > ret = 0;
> > - for_each_node_state(node, N_POSSIBLE) {
> > + for_each_node_state(node, N_HIGH_MEMORY) {
> > for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
> > enum lru_list l;
> > for_each_lru(l) {
> >
> >
> >
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems
2009-01-19 9:15 [memcg BUG] NULL pointer dereference wheng rmdir Li Zefan
2009-01-19 9:33 ` KAMEZAWA Hiroyuki
@ 2009-01-19 9:55 ` KAMEZAWA Hiroyuki
2009-01-19 22:26 ` KOSAKI Motohiro
2009-01-20 1:08 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems v2 KAMEZAWA Hiroyuki
1 sibling, 2 replies; 10+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-01-19 9:55 UTC (permalink / raw)
To: akpm@linux-foundation.org
Cc: Li Zefan, Balbir Singh, Daisuke Nishimura, linux-mm@kvack.org
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
On NUMA, N_POSSIBLE doesn't means there is memory...and force_empty can
visit invalud node which have no pgdat.
This happens on some NUMA systems which defines memory-less-node, node-hotplug.
Note: memcg's its own controll structs are allocated against all POSSIBLE nodes.
To visit all valid pgdat, N_HIGH_MEMRY should be used.
Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
===================================================================
--- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
+++ mmotm-2.6.29-Jan16/mm/memcontrol.c
@@ -1724,7 +1724,7 @@ move_account:
/* This is for making all *used* pages to be on LRU. */
lru_add_drain_all();
ret = 0;
- for_each_node_state(node, N_POSSIBLE) {
+ for_each_node_state(node, N_HIGH_MEMORY) {
for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
enum lru_list l;
for_each_lru(l) {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [memcg BUG] NULL pointer dereference wheng rmdir
2009-01-19 9:33 ` KAMEZAWA Hiroyuki
2009-01-19 9:45 ` Li Zefan
@ 2009-01-19 9:59 ` Balbir Singh
1 sibling, 0 replies; 10+ messages in thread
From: Balbir Singh @ 2009-01-19 9:59 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki; +Cc: Li Zefan, Daisuke Nishimura, linux-mm@kvack.org
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-01-19 18:33:41]:
> On Mon, 19 Jan 2009 17:15:05 +0800
> Li Zefan <lizf@cn.fujitsu.com> wrote:
>
> > note: rmdir[11520] exited with preempt_count 1
> > ===========================================================================
> >
> >
> > And I've confirmed it's because (zone == NULL) in mem_cgroup_force_empty_list():
> >
> >
> Hmm, curious. it will be
>
> ==
> for_each_node_state(nid, N_POSSIBLE)
> for (zid = 0; zid < MAX_NR_ZONES; zid++)
> zone = &NODE_DATA(nid)->node_zones[zid];
>
> ==
>
> And, from this message,
>
> Unable to handle kernel NULL pointer dereference (address 0000000000002680)
>
> NODE_DATA(nid) seems to be NULL.
>
> Hmm...could you try this ? Thank you for nice test, very helpful.
> -Kame
> ==
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> N_POSSIBLE doesn't means there is memory...and force_empty can
> visit invalud node which have no pgdat.
>
> To visit all valid nodes, N_HIGH_MEMRY should be used.
>
> Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> ---
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
> ===================================================================
> --- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
> +++ mmotm-2.6.29-Jan16/mm/memcontrol.c
> @@ -1724,7 +1724,7 @@ move_account:
> /* This is for making all *used* pages to be on LRU. */
> lru_add_drain_all();
> ret = 0;
> - for_each_node_state(node, N_POSSIBLE) {
> + for_each_node_state(node, N_HIGH_MEMORY) {
> for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
> enum lru_list l;
> for_each_lru(l) {
>
>
Looks correct to me, but I would wait for Li to test and confirm
Otherwise
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
--
Balbir
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems
2009-01-19 9:55 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems KAMEZAWA Hiroyuki
@ 2009-01-19 22:26 ` KOSAKI Motohiro
2009-01-20 0:00 ` KAMEZAWA Hiroyuki
2009-01-20 1:08 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems v2 KAMEZAWA Hiroyuki
1 sibling, 1 reply; 10+ messages in thread
From: KOSAKI Motohiro @ 2009-01-19 22:26 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: kosaki.motohiro, akpm@linux-foundation.org, Li Zefan,
Balbir Singh, Daisuke Nishimura, linux-mm@kvack.org
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> On NUMA, N_POSSIBLE doesn't means there is memory...and force_empty can
> visit invalud node which have no pgdat.
invalid?
> This happens on some NUMA systems which defines memory-less-node, node-hotplug.
>
> Note: memcg's its own controll structs are allocated against all POSSIBLE nodes.
>
> To visit all valid pgdat, N_HIGH_MEMRY should be used.
>
> Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
> Tested-by: Li Zefan <lizf@cn.fujitsu.com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> ---
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
> ===================================================================
> --- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
> +++ mmotm-2.6.29-Jan16/mm/memcontrol.c
> @@ -1724,7 +1724,7 @@ move_account:
> /* This is for making all *used* pages to be on LRU. */
> lru_add_drain_all();
> ret = 0;
> - for_each_node_state(node, N_POSSIBLE) {
> + for_each_node_state(node, N_HIGH_MEMORY) {
> for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
> enum lru_list l;
> for_each_lru(l) {
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems
2009-01-19 22:26 ` KOSAKI Motohiro
@ 2009-01-20 0:00 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 10+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-01-20 0:00 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: akpm@linux-foundation.org, Li Zefan, Balbir Singh,
Daisuke Nishimura, linux-mm@kvack.org
On Tue, 20 Jan 2009 07:26:32 +0900 (JST)
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> >
> > On NUMA, N_POSSIBLE doesn't means there is memory...and force_empty can
> > visit invalud node which have no pgdat.
> invalid?
>
>
invalid...
thanks,
-Kame
> > This happens on some NUMA systems which defines memory-less-node, node-hotplug.
> >
> > Note: memcg's its own controll structs are allocated against all POSSIBLE nodes.
> >
> > To visit all valid pgdat, N_HIGH_MEMRY should be used.
> >
> > Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
> > Tested-by: Li Zefan <lizf@cn.fujitsu.com>
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> >
> > ---
> > mm/memcontrol.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
> > ===================================================================
> > --- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
> > +++ mmotm-2.6.29-Jan16/mm/memcontrol.c
> > @@ -1724,7 +1724,7 @@ move_account:
> > /* This is for making all *used* pages to be on LRU. */
> > lru_add_drain_all();
> > ret = 0;
> > - for_each_node_state(node, N_POSSIBLE) {
> > + for_each_node_state(node, N_HIGH_MEMORY) {
> > for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
> > enum lru_list l;
> > for_each_lru(l) {
> >
> > --
> > To unsubscribe, send a message with 'unsubscribe linux-mm' in
> > the body to majordomo@kvack.org. For more info on Linux MM,
> > see: http://www.linux-mm.org/ .
> > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
>
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems v2
2009-01-19 9:55 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems KAMEZAWA Hiroyuki
2009-01-19 22:26 ` KOSAKI Motohiro
@ 2009-01-20 1:08 ` KAMEZAWA Hiroyuki
2009-01-20 1:48 ` Li Zefan
1 sibling, 1 reply; 10+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-01-20 1:08 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: akpm@linux-foundation.org, Li Zefan, Balbir Singh,
Daisuke Nishimura, linux-mm@kvack.org
fixed typos in description.
==
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
N_POSSIBLE doesn't means there is memory...and force_empty can
visit invalid node which have no pgdat.
To visit all valid nodes, N_HIGH_MEMORY should be used.
Changelog: v1->v2
- fix typo in description.
Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mmotm-2.6.29-Jan16/mm/memcontrol.c
===================================================================
--- mmotm-2.6.29-Jan16.orig/mm/memcontrol.c
+++ mmotm-2.6.29-Jan16/mm/memcontrol.c
@@ -1724,7 +1724,7 @@ move_account:
/* This is for making all *used* pages to be on LRU. */
lru_add_drain_all();
ret = 0;
- for_each_node_state(node, N_POSSIBLE) {
+ for_each_node_state(node, N_HIGH_MEMORY) {
for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
enum lru_list l;
for_each_lru(l) {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems v2
2009-01-20 1:08 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems v2 KAMEZAWA Hiroyuki
@ 2009-01-20 1:48 ` Li Zefan
0 siblings, 0 replies; 10+ messages in thread
From: Li Zefan @ 2009-01-20 1:48 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: akpm@linux-foundation.org, Balbir Singh, Daisuke Nishimura,
linux-mm@kvack.org
KAMEZAWA Hiroyuki wrote:
> fixed typos in description.
> ==
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> N_POSSIBLE doesn't means there is memory...and force_empty can
> visit invalid node which have no pgdat.
>
> To visit all valid nodes, N_HIGH_MEMORY should be used.
>
> Changelog: v1->v2
> - fix typo in description.
>
> Reporetd-by: Li Zefan <lizf@cn.fujitsu.com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
I've just tested this patch with a more complex test case.
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-01-20 1:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 9:15 [memcg BUG] NULL pointer dereference wheng rmdir Li Zefan
2009-01-19 9:33 ` KAMEZAWA Hiroyuki
2009-01-19 9:45 ` Li Zefan
2009-01-19 9:49 ` KAMEZAWA Hiroyuki
2009-01-19 9:59 ` Balbir Singh
2009-01-19 9:55 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems KAMEZAWA Hiroyuki
2009-01-19 22:26 ` KOSAKI Motohiro
2009-01-20 0:00 ` KAMEZAWA Hiroyuki
2009-01-20 1:08 ` [BUGFIX][PATCH] memcg: NULL pointer dereference at rmdir on some NUMA systems v2 KAMEZAWA Hiroyuki
2009-01-20 1:48 ` Li Zefan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).