|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH]Fix memory leak for copy-receiver of netfront
Hi all,
We found the problem of the memory leak when working with copy-
receiver of netfront.
The source of a problem is that the fragment page is not released with
dev_kfree_skb() because the nr_frags variable of skb is set to 0.
This is the patch to fix memory leak in netfront.
Signed-off-by: Kazuhiro Suzuki <kaz@xxxxxxxxxxxxxx>
Signed-off-by: Hirofumi Tsujimura <tsujimura.hirof@xxxxxxxxxxxxxx>
Signed-off-by: Takanori Kasai <kasai.takanori@xxxxxxxxxxxxxx>
A guest kernel does panic if attaching and detaching VNIF is repeated.
Because guest memory becomes empty, and OOM killer is run.
It is a log of that time as follows.
------------------------------------------------------------------------
<dom0 log>
# xm network-attach guest
# xm network-detach guest 0
# xm network-attach guest
# xm network-detach guest 1
... repeat ...
# xm network-attach guest
# xm network-detach guest 179
# xm network-attach guest
# xm network-detach guest 180
Error: Domain 'guest' does not exist.
<guest log>
# free -m
total used free shared buffers
cached
Mem: 512 504 8 0 23
174
-/+ buffers/cache: 305 206
Swap: 511 0 511
... repeat ...
# free -m
total used free shared buffers
cached
Mem: 512 509 2 0 0
1
-/+ buffers/cache: 507 4
Swap: 511 50 461
awk invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=-17
Call Trace:
[<a00000010001d160>] show_stack+0x40/0xa0
sp=e00000001e0a7a70 bsp=e00000001e0a1480
[<a00000010001d1f0>] dump_stack+0x30/0x60
sp=e00000001e0a7c40 bsp=e00000001e0a1468
[<a00000010011b1b0>] out_of_memory+0xf0/0x780
sp=e00000001e0a7c40 bsp=e00000001e0a1430
[<a000000100121040>] __alloc_pages+0x420/0x540
sp=e00000001e0a7cd0 bsp=e00000001e0a13b8
... snip ...
Kernel panic - not syncing: Out of memory and no killable processes...
------------------------------------------------------------------------
Best Regards,
---
Takanori Kasai
fix-netfront-memory-leak.patch
Description: Binary data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH]Fix memory leak for copy-receiver of netfront,
Kasai Takanori <=
|
|
|
|
|