<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/mm/vmalloc.c, branch linux-2.6.30.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>alloc_vmap_area: fix memory leak</title>
<updated>2009-05-06T23:36:10+00:00</updated>
<author>
<name>Ralph Wuerthner</name>
<email>ralphw@linux.vnet.ibm.com</email>
</author>
<published>2009-05-06T23:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2498ce42d3a4d1a498f1df4884da960087547db7'/>
<id>2498ce42d3a4d1a498f1df4884da960087547db7</id>
<content type='text'>
If alloc_vmap_area() fails the allocated struct vmap_area has to be freed.

Signed-off-by: Ralph Wuerthner &lt;ralphw@linux.vnet.ibm.com&gt;
Reviewed-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Reviewed-by: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If alloc_vmap_area() fails the allocated struct vmap_area has to be freed.

Signed-off-by: Ralph Wuerthner &lt;ralphw@linux.vnet.ibm.com&gt;
Reviewed-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Reviewed-by: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmap: remove needless lock and list in vmap</title>
<updated>2009-04-01T15:59:11+00:00</updated>
<author>
<name>MinChan Kim</name>
<email>minchan.kim@gmail.com</email>
</author>
<published>2009-03-31T22:19:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d086817dc0d42f1be8db4138233d33e1dd16a956'/>
<id>d086817dc0d42f1be8db4138233d33e1dd16a956</id>
<content type='text'>
vmap's dirty_list is unused.  It's for optimizing flushing.  but Nick
didn't write the code yet.  so, we don't need it until time as it is
needed.

This patch removes vmap_block's dirty_list and codes related to it.

Signed-off-by: MinChan Kim &lt;minchan.kim@gmail.com&gt;
Acked-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vmap's dirty_list is unused.  It's for optimizing flushing.  but Nick
didn't write the code yet.  so, we don't need it until time as it is
needed.

This patch removes vmap_block's dirty_list and codes related to it.

Signed-off-by: MinChan Kim &lt;minchan.kim@gmail.com&gt;
Acked-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'x86/core' into core/percpu</title>
<updated>2009-03-04T01:29:19+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-04T01:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=91d75e209bd59695f0708d66964d928d45b3b2f3'/>
<id>91d75e209bd59695f0708d66964d928d45b3b2f3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'x86/urgent' into x86/pat</title>
<updated>2009-03-01T11:47:58+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-01T11:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=55f2b78995826d549401bdf20abeac1832636bb6'/>
<id>55f2b78995826d549401bdf20abeac1832636bb6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: fix lazy vmap purging (use-after-free error)</title>
<updated>2009-02-28T00:26:21+00:00</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@gmail.com</email>
</author>
<published>2009-02-27T22:03:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cbb766766f3f2f6d9326c561b1020590642c6e39'/>
<id>cbb766766f3f2f6d9326c561b1020590642c6e39</id>
<content type='text'>
I just got this new warning from kmemcheck:

    WARNING: kmemcheck: Caught 32-bit read from freed memory (c7806a60)
    a06a80c7ecde70c1a04080c700000000a06709c1000000000000000000000000
     f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f
     ^

    Pid: 0, comm: swapper Not tainted (2.6.29-rc4 #230)
    EIP: 0060:[&lt;c1096df7&gt;] EFLAGS: 00000286 CPU: 0
    EIP is at __purge_vmap_area_lazy+0x117/0x140
    EAX: 00070f43 EBX: c7806a40 ECX: c1677080 EDX: 00027b66
    ESI: 00002001 EDI: c170df0c EBP: c170df00 ESP: c178830c
     DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
    CR0: 80050033 CR2: c7806b14 CR3: 01775000 CR4: 00000690
    DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
    DR6: 00004000 DR7: 00000000
     [&lt;c1096f3e&gt;] free_unmap_vmap_area_noflush+0x6e/0x70
     [&lt;c1096f6a&gt;] remove_vm_area+0x2a/0x70
     [&lt;c1097025&gt;] __vunmap+0x45/0xe0
     [&lt;c10970de&gt;] vunmap+0x1e/0x30
     [&lt;c1008ba5&gt;] text_poke+0x95/0x150
     [&lt;c1008ca9&gt;] alternatives_smp_unlock+0x49/0x60
     [&lt;c171ef47&gt;] alternative_instructions+0x11b/0x124
     [&lt;c171f991&gt;] check_bugs+0xbd/0xdc
     [&lt;c17148c5&gt;] start_kernel+0x2ed/0x360
     [&lt;c171409e&gt;] __init_begin+0x9e/0xa9
     [&lt;ffffffff&gt;] 0xffffffff

It happened here:

    $ addr2line -e vmlinux -i c1096df7
    mm/vmalloc.c:540

Code:

	list_for_each_entry(va, &amp;valist, purge_list)
		__free_vmap_area(va);

It's this instruction:

    mov    0x20(%ebx),%edx

Which corresponds to a dereference of va-&gt;purge_list.next:

    (gdb) p ((struct vmap_area *) 0)-&gt;purge_list.next
    Cannot access memory at address 0x20

It seems that we should use "safe" list traversal here, as the element
is freed inside the loop. Please verify that this is the right fix.

Acked-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.28.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I just got this new warning from kmemcheck:

    WARNING: kmemcheck: Caught 32-bit read from freed memory (c7806a60)
    a06a80c7ecde70c1a04080c700000000a06709c1000000000000000000000000
     f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f
     ^

    Pid: 0, comm: swapper Not tainted (2.6.29-rc4 #230)
    EIP: 0060:[&lt;c1096df7&gt;] EFLAGS: 00000286 CPU: 0
    EIP is at __purge_vmap_area_lazy+0x117/0x140
    EAX: 00070f43 EBX: c7806a40 ECX: c1677080 EDX: 00027b66
    ESI: 00002001 EDI: c170df0c EBP: c170df00 ESP: c178830c
     DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
    CR0: 80050033 CR2: c7806b14 CR3: 01775000 CR4: 00000690
    DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
    DR6: 00004000 DR7: 00000000
     [&lt;c1096f3e&gt;] free_unmap_vmap_area_noflush+0x6e/0x70
     [&lt;c1096f6a&gt;] remove_vm_area+0x2a/0x70
     [&lt;c1097025&gt;] __vunmap+0x45/0xe0
     [&lt;c10970de&gt;] vunmap+0x1e/0x30
     [&lt;c1008ba5&gt;] text_poke+0x95/0x150
     [&lt;c1008ca9&gt;] alternatives_smp_unlock+0x49/0x60
     [&lt;c171ef47&gt;] alternative_instructions+0x11b/0x124
     [&lt;c171f991&gt;] check_bugs+0xbd/0xdc
     [&lt;c17148c5&gt;] start_kernel+0x2ed/0x360
     [&lt;c171409e&gt;] __init_begin+0x9e/0xa9
     [&lt;ffffffff&gt;] 0xffffffff

It happened here:

    $ addr2line -e vmlinux -i c1096df7
    mm/vmalloc.c:540

Code:

	list_for_each_entry(va, &amp;valist, purge_list)
		__free_vmap_area(va);

It's this instruction:

    mov    0x20(%ebx),%edx

Which corresponds to a dereference of va-&gt;purge_list.next:

    (gdb) p ((struct vmap_area *) 0)-&gt;purge_list.next
    Cannot access memory at address 0x20

It seems that we should use "safe" list traversal here, as the element
is freed inside the loop. Please verify that this is the right fix.

Acked-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.28.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: vmap fix overflow</title>
<updated>2009-02-28T00:26:21+00:00</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2009-02-27T22:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7766970cc13e9071b356b1f2a48a9eb8675bfcce'/>
<id>7766970cc13e9071b356b1f2a48a9eb8675bfcce</id>
<content type='text'>
The new vmap allocator can wrap the address and get confused in the case
of large allocations or VMALLOC_END near the end of address space.

Problem reported by Christoph Hellwig on a 32-bit XFS workload.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.28.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new vmap allocator can wrap the address and get confused in the case
of large allocations or VMALLOC_END near the end of address space.

Problem reported by Christoph Hellwig on a 32-bit XFS workload.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.28.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'x86/apic', 'x86/defconfig', 'x86/memtest', 'x86/mm' and 'linus' into x86/core</title>
<updated>2009-02-26T05:31:32+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-02-26T05:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ecc25fbd6b9e07b33895c61ddf84006b00f55d99'/>
<id>ecc25fbd6b9e07b33895c61ddf84006b00f55d99</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>x86: make vmap yell louder when it is used under irqs_disabled()</title>
<updated>2009-02-25T15:38:34+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2009-02-25T15:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=34754b69a6f87aa6aa2860525a82f12532f83afd'/>
<id>34754b69a6f87aa6aa2860525a82f12532f83afd</id>
<content type='text'>
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'tj-percpu' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into core/percpu</title>
<updated>2009-02-24T20:52:45+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-02-24T20:52:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0edcf8d6926f4038443dbc24e319530177ca0353'/>
<id>0edcf8d6926f4038443dbc24e319530177ca0353</id>
<content type='text'>
Conflicts:
	arch/x86/include/asm/pgtable.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	arch/x86/include/asm/pgtable.h
</pre>
</div>
</content>
</entry>
<entry>
<title>vmalloc: add @align to vm_area_register_early()</title>
<updated>2009-02-24T02:57:21+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-02-24T02:57:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c0c0a29379b5848aec2e8f1c58d853d3cb7118b8'/>
<id>c0c0a29379b5848aec2e8f1c58d853d3cb7118b8</id>
<content type='text'>
Impact: allow larger alignment for early vmalloc area allocation

Some early vmalloc users might want larger alignment, for example, for
custom large page mapping.  Add @align to vm_area_register_early().
While at it, drop docbook comment on non-existent @size.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: allow larger alignment for early vmalloc area allocation

Some early vmalloc users might want larger alignment, for example, for
custom large page mapping.  Add @align to vm_area_register_early().
While at it, drop docbook comment on non-existent @size.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
</pre>
</div>
</content>
</entry>
</feed>
