<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/lib, branch linux-2.6.35.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.35.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.35.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2011-08-01T20:54:58Z</updated>
<entry>
<title>debugobjects: Fix boot crash when kmemleak and debugobjects enabled</title>
<updated>2011-08-01T20:54:58Z</updated>
<author>
<name>Marcin Slusarz</name>
<email>marcin.slusarz@gmail.com</email>
</author>
<published>2011-05-28T11:23:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=df9ceceff3742d28c59093c6c60b3ef1359fdf96'/>
<id>urn:sha1:df9ceceff3742d28c59093c6c60b3ef1359fdf96</id>
<content type='text'>
commit 161b6ae0e067e421b20bb35caf66bdb405c929ac upstream.

Order of initialization look like this:
...
debugobjects
kmemleak
...(lots of other subsystems)...
workqueues (through early initcall)
...

debugobjects use schedule_work for batch freeing of its data and kmemleak
heavily use debugobjects, so when it comes to freeing and workqueues were
not initialized yet, kernel crashes:

BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [&lt;ffffffff810854d1&gt;] __queue_work+0x29/0x41a
 [&lt;ffffffff81085910&gt;] queue_work_on+0x16/0x1d
 [&lt;ffffffff81085abc&gt;] queue_work+0x29/0x55
 [&lt;ffffffff81085afb&gt;] schedule_work+0x13/0x15
 [&lt;ffffffff81242de1&gt;] free_object+0x90/0x95
 [&lt;ffffffff81242f6d&gt;] debug_check_no_obj_freed+0x187/0x1d3
 [&lt;ffffffff814b6504&gt;] ? _raw_spin_unlock_irqrestore+0x30/0x4d
 [&lt;ffffffff8110bd14&gt;] ? free_object_rcu+0x68/0x6d
 [&lt;ffffffff8110890c&gt;] kmem_cache_free+0x64/0x12c
 [&lt;ffffffff8110bd14&gt;] free_object_rcu+0x68/0x6d
 [&lt;ffffffff810b58bc&gt;] __rcu_process_callbacks+0x1b6/0x2d9
...

because system_wq is NULL.

Fix it by checking if workqueues susbystem was initialized before using.

Signed-off-by: Marcin Slusarz &lt;marcin.slusarz@gmail.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Dipankar Sarma &lt;dipankar@in.ibm.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/20110528112342.GA3068@joi.lan
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>rcu: Fix unpaired rcu_irq_enter() from locking selftests</title>
<updated>2011-08-01T20:54:51Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2011-05-20T00:09:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=738b2bfd83a0bc74f14ca52e7e0fc87be8996176'/>
<id>urn:sha1:738b2bfd83a0bc74f14ca52e7e0fc87be8996176</id>
<content type='text'>
commit ba9f207c9f82115aba4ce04b22e0081af0ae300f upstream.

HARDIRQ_ENTER() maps to irq_enter() which calls rcu_irq_enter().
But HARDIRQ_EXIT() maps to __irq_exit() which doesn't call
rcu_irq_exit().

So for every locking selftest that simulates hardirq disabled,
we create an imbalance in the rcu extended quiescent state
internal state.

As a result, after the first missing rcu_irq_exit(), subsequent
irqs won't exit dyntick-idle mode after leaving the interrupt
handler.  This means that RCU won't see the affected CPU as being
in an extended quiescent state, resulting in long grace-period
delays (as in grace periods extending for hours).

To fix this, just use __irq_enter() to simulate the hardirq
context. This is sufficient for the locking selftests as we
don't need to exit any extended quiescent state or perform
any check that irqs normally do when they wake up from idle.

As a side effect, this patch makes it possible to restore
"rcu: Decrease memory-barrier usage based on semi-formal proof",
which eventually helped finding this bug.

Reported-and-tested-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>radix-tree: fix RCU bug</title>
<updated>2010-12-14T22:40:10Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@kernel.dk</email>
</author>
<published>2010-11-11T22:05:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=009c1847bbc6a87c995d8ad5f575f2648b76222a'/>
<id>urn:sha1:009c1847bbc6a87c995d8ad5f575f2648b76222a</id>
<content type='text'>
commit 27d20fddc8af539464fc3ba499d6a830054c3bd6 upstream.

Salman Qazi describes the following radix-tree bug:

In the following case, we get can get a deadlock:

0.  The radix tree contains two items, one has the index 0.
1.  The reader (in this case find_get_pages) takes the rcu_read_lock.
2.  The reader acquires slot(s) for item(s) including the index 0 item.
3.  The non-zero index item is deleted, and as a consequence the other item is
    moved to the root of the tree. The place where it used to be is queued for
    deletion after the readers finish.
3b. The zero item is deleted, removing it from the direct slot, it remains in
    the rcu-delayed indirect node.
4.  The reader looks at the index 0 slot, and finds that the page has 0 ref
    count
5.  The reader looks at it again, hoping that the item will either be freed or
    the ref count will increase. This never happens, as the slot it is looking
    at will never be updated. Also, this slot can never be reclaimed because
    the reader is holding rcu_read_lock and is in an infinite loop.

The fix is to re-use the same "indirect" pointer case that requires a slot
lookup retry into a general "retry the lookup" bit.

Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Reported-by: Salman Qazi &lt;sqazi@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>percpu: fix list_head init bug in __percpu_counter_init()</title>
<updated>2010-12-14T22:40:05Z</updated>
<author>
<name>Masanori ITOH</name>
<email>itoumsn@nttdata.co.jp</email>
</author>
<published>2010-10-26T21:21:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=41ba4ea6ba426acc9a6eb18abfde5e1c1287563a'/>
<id>urn:sha1:41ba4ea6ba426acc9a6eb18abfde5e1c1287563a</id>
<content type='text'>
commit 8474b591faf3bb0a1e08a60d21d6baac498f15e4 upstream.

WARNING: at lib/list_debug.c:26 __list_add+0x3f/0x81()
Hardware name: Express5800/B120a [N8400-085]
list_add corruption. next-&gt;prev should be prev (ffffffff81a7ea00), but was dead000000200200. (next=ffff88080b872d58).
Modules linked in: aoe ipt_MASQUERADE iptable_nat nf_nat autofs4 sunrpc bridge 8021q garp stp llc ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_round_robin dm_multipath kvm_intel kvm uinput lpfc scsi_transport_fc igb ioatdma scsi_tgt i2c_i801 i2c_core dca iTCO_wdt iTCO_vendor_support pcspkr shpchp megaraid_sas [last unloaded: aoe]
Pid: 54, comm: events/3 Tainted: G        W  2.6.34-vanilla1 #1
Call Trace:
[&lt;ffffffff8104bd77&gt;] warn_slowpath_common+0x7c/0x94
[&lt;ffffffff8104bde6&gt;] warn_slowpath_fmt+0x41/0x43
[&lt;ffffffff8120fd2e&gt;] __list_add+0x3f/0x81
[&lt;ffffffff81212a12&gt;] __percpu_counter_init+0x59/0x6b
[&lt;ffffffff810d8499&gt;] bdi_init+0x118/0x17e
[&lt;ffffffff811f2c50&gt;] blk_alloc_queue_node+0x79/0x143
[&lt;ffffffff811f2d2b&gt;] blk_alloc_queue+0x11/0x13
[&lt;ffffffffa02a931d&gt;] aoeblk_gdalloc+0x8e/0x1c9 [aoe]
[&lt;ffffffffa02aa655&gt;] aoecmd_sleepwork+0x25/0xa8 [aoe]
[&lt;ffffffff8106186c&gt;] worker_thread+0x1a9/0x237
[&lt;ffffffffa02aa630&gt;] ? aoecmd_sleepwork+0x0/0xa8 [aoe]
[&lt;ffffffff81065827&gt;] ? autoremove_wake_function+0x0/0x39
[&lt;ffffffff810616c3&gt;] ? worker_thread+0x0/0x237
[&lt;ffffffff810653ad&gt;] kthread+0x7f/0x87
[&lt;ffffffff8100aa24&gt;] kernel_thread_helper+0x4/0x10
[&lt;ffffffff8106532e&gt;] ? kthread+0x0/0x87
[&lt;ffffffff8100aa20&gt;] ? kernel_thread_helper+0x0/0x10

It's because there is no initialization code for a list_head contained in
the struct backing_dev_info under CONFIG_HOTPLUG_CPU, and the bug comes up
when block device drivers calling blk_alloc_queue() are used.  In case of
me, I got them by using aoe.

Signed-off-by: Masanori Itoh &lt;itoumsn@nttdata.co.jp&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>lib/list_sort: do not pass bad pointers to cmp callback</title>
<updated>2010-10-29T04:51:09Z</updated>
<author>
<name>Don Mullis</name>
<email>don.mullis@gmail.com</email>
</author>
<published>2010-09-30T22:15:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a7b048db83992dba877da7b85d8b1236324f9763'/>
<id>urn:sha1:a7b048db83992dba877da7b85d8b1236324f9763</id>
<content type='text'>
commit f015ac3edd84ad72f88e08a4d83c56c360aae404 upstream.

If the original list is a POT in length, the first callback from line 73
will pass a==b both pointing to the original list_head.  This is dangerous
because the 'list_sort()' user can use 'container_of()' and accesses the
"containing" object, which does not necessary exist for the list head.  So
the user can access RAM which does not belong to him.  If this is a write
access, we can end up with memory corruption.

Signed-off-by: Don Mullis &lt;don.mullis@gmail.com&gt;
Tested-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>lmb: rename to memblock</title>
<updated>2010-07-14T07:14:00Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2010-07-12T04:36:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=95f72d1ed41a66f1c1c29c24d479de81a0bea36f'/>
<id>urn:sha1:95f72d1ed41a66f1c1c29c24d479de81a0bea36f</id>
<content type='text'>
via following scripts

      FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

      sed -i \
        -e 's/lmb/memblock/g' \
        -e 's/LMB/MEMBLOCK/g' \
        $FILES

      for N in $(find . -name lmb.[ch]); do
        M=$(echo $N | sed 's/lmb/memblock/g')
        mv $N $M
      done

and remove some wrong change like lmbench and dlmb etc.

also move memblock.c from lib/ to mm/

Suggested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2010-07-07T00:16:09Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-07-07T00:16:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=47a716cf0ca981b9549ec9815122ada7a0ff707c'/>
<id>urn:sha1:47a716cf0ca981b9549ec9815122ada7a0ff707c</id>
<content type='text'>
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rbtree: Undo augmented trees performance damage and regression
  x86, Calgary: Limit the max PHB number to 256
</content>
</entry>
<entry>
<title>rbtree: Undo augmented trees performance damage and regression</title>
<updated>2010-07-05T12:43:50Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2010-05-29T13:31:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b945d6b2554d550fe95caadc61e521c0ad71fb9c'/>
<id>urn:sha1:b945d6b2554d550fe95caadc61e521c0ad71fb9c</id>
<content type='text'>
Reimplement augmented RB-trees without sprinkling extra branches
all over the RB-tree code (which lives in the scheduler hot path).

This approach is 'borrowed' from Fabio's BFQ implementation and
relies on traversing the rebalance path after the RB-tree-op to
correct the heap property for insertion/removal and make up for
the damage done by the tree rotations.

For insertion the rebalance path is trivially that from the new
node upwards to the root, for removal it is that from the deepest
node in the path from the to be removed node that will still
be around after the removal.

[ This patch also fixes a video driver regression reported by
  Ali Gholami Rudi - the memtype-&gt;subtree_max_end was updated
  incorrectly. ]

Acked-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Acked-by: Venkatesh Pallipadi &lt;venki@google.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Tested-by: Ali Gholami Rudi &lt;ali@rudi.ir&gt;
Cc: Fabio Checconi &lt;fabio@gandalf.sssup.it&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
LKML-Reference: &lt;1275414172.27810.27961.camel@twins&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>module: initialize module dynamic debug later</title>
<updated>2010-07-05T03:17:22Z</updated>
<author>
<name>Yehuda Sadeh</name>
<email>yehuda@hq.newdream.net</email>
</author>
<published>2010-07-03T03:07:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ff49d74ad383f54041378144ca1a229ee9aeaa59'/>
<id>urn:sha1:ff49d74ad383f54041378144ca1a229ee9aeaa59</id>
<content type='text'>
We should initialize the module dynamic debug datastructures
only after determining that the module is not loaded yet. This
fixes a bug that introduced in 2.6.35-rc2, where when a trying
to load a module twice, we also load it's dynamic printing data
twice which causes all sorts of nasty issues. Also handle
the dynamic debug cleanup later on failure.

Signed-off-by: Yehuda Sadeh &lt;yehuda@hq.newdream.net&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (removed a #ifdef)
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>genalloc: fix allocation from end of pool</title>
<updated>2010-06-29T22:29:30Z</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@nokia.com</email>
</author>
<published>2010-06-29T22:05:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e621ba9932aa0a90e47c12c958b3a3104915f3b9'/>
<id>urn:sha1:e621ba9932aa0a90e47c12c958b3a3104915f3b9</id>
<content type='text'>
bitmap_find_next_zero_area requires the size of the bitmap, we instead
passed the last suitable position.  This made it impossible to allocate
from the end of the pool.

Fixes a regression introduced by 243797f59b748f679ab88d456fcc4f92236d724b
("genalloc: use bitmap_find_next_zero_area").

Signed-off-by: Imre Deak &lt;imre.deak@nokia.com&gt;
Cc: Zygo Blaxell &lt;zygo.blaxell@xandros.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
