<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib, branch v2.6.26-rc7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/lib?h=v2.6.26-rc7</id>
<link rel='self' href='https://git.amat.us/linux/atom/lib?h=v2.6.26-rc7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2008-06-13T01:05:41Z</updated>
<entry>
<title>radix-tree: fix small lockless radix-tree bug</title>
<updated>2008-06-13T01:05:41Z</updated>
<author>
<name>Nick Piggin</name>
<email>nickpiggin@yahoo.com.au</email>
</author>
<published>2008-06-12T22:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=643b52b9c0b4e959436b4b551ebf4060d06d5ae8'/>
<id>urn:sha1:643b52b9c0b4e959436b4b551ebf4060d06d5ae8</id>
<content type='text'>
We shrink a radix tree when its root node has only one child, in the left
most slot.  The child becomes the new root node.  To perform this
operation in a manner compatible with concurrent lockless lookups, we
atomically switch the root pointer from the parent to its child.

However a concurrent lockless lookup may now have loaded a pointer to the
parent (and is presently deciding what to do next).  For this reason, we
also have to keep the parent node in a valid state after shrinking the
tree, until the next RCU grace period -- otherwise this lookup with the
parent pointer may not do the right thing.  Notably, we need to keep the
child in the left most slot there in case that is requested by the lookup.

This is all pretty standard RCU stuff.  It is worth repeating because in
my eagerness to obey the radix tree node constructor scheme, I had broken
it by zeroing the radix tree node before the grace period.

What could happen is that a lookup can load the parent pointer, then
decide it wants to follow the left most child slot, only to find the slot
contained NULL due to the concurrent shrinker having zeroed the parent
node before waiting for a grace period.  The lookup would return a false
negative as a result.

Fix it by doing that clearing in the RCU callback.  I would normally want
to rip out the constructor entirely, but radix tree nodes are one of those
places where they make sense (only few cachelines will be touched soon
after allocation).

This was never actually found in any lockless pagecache testing or by the
test harness, but by seeing the odd problem with my scalable vmap rewrite.
 I have not tickled the test harness into reproducing it yet, but I'll
keep working at it.

Fortunately, it is not a problem anywhere lockless pagecache is used in
mainline kernels (pagecache probe is not a guarantee, and brd does not
have concurrent lookups and deletes).

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: "Paul E. McKenney" &lt;paulmck@us.ibm.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>
<entry>
<title>add an inlined version of iter_div_u64_rem</title>
<updated>2008-06-12T08:47:58Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy.fitzhardinge@citrix.com</email>
</author>
<published>2008-06-12T08:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d5e181f78ac753893eb930868a52a4488cd3de0a'/>
<id>urn:sha1:d5e181f78ac753893eb930868a52a4488cd3de0a</id>
<content type='text'>
iter_div_u64_rem is used in the x86-64 vdso, which cannot call other
kernel code.  For this case, provide the always_inlined version,
__iter_div_u64_rem.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy.fitzhardinge@citrix.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>common implementation of iterative div/mod</title>
<updated>2008-06-12T08:47:56Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy.fitzhardinge@citrix.com</email>
</author>
<published>2008-06-12T08:47:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f595ec964daf7f99668039d7303ddedd09a75142'/>
<id>urn:sha1:f595ec964daf7f99668039d7303ddedd09a75142</id>
<content type='text'>
We have a few instances of the open-coded iterative div/mod loop, used
when we don't expcet the dividend to be much bigger than the divisor.
Unfortunately modern gcc's have the tendency to strength "reduce" this
into a full mod operation, which isn't necessarily any faster, and
even if it were, doesn't exist if gcc implements it in libgcc.

The workaround is to put a dummy asm statement in the loop to prevent
gcc from performing the transformation.

This patch creates a single implementation of this loop, and uses it
to replace the open-coded versions I know about.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy.fitzhardinge@citrix.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: john stultz &lt;johnstul@us.ibm.com&gt;
Cc: Segher Boessenkool &lt;segher@kernel.crashing.org&gt;
Cc: Christian Kujau &lt;lists@nerdbynature.de&gt;
Cc: Robert Hancock &lt;hancockr@shaw.ca&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lib: export bitrev16</title>
<updated>2008-06-06T18:29:10Z</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-06-06T05:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3527fb326f07bc8e85cf66d4f987ebeea24e8e4a'/>
<id>urn:sha1:3527fb326f07bc8e85cf66d4f987ebeea24e8e4a</id>
<content type='text'>
Bluetooth will be able to use this.

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: 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>
<entry>
<title>lmb: Fix compile warning</title>
<updated>2008-05-19T04:35:43Z</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2008-05-18T18:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f9ebcd9d410ba7209a8f321c41edf8615fc3ce67'/>
<id>urn:sha1:f9ebcd9d410ba7209a8f321c41edf8615fc3ce67</id>
<content type='text'>
lib/lmb.c: In function 'lmb_dump_all':
lib/lmb.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'u64'

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs</title>
<updated>2008-05-15T02:30:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-05-15T02:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f40f672e6bb071812f61bfbd30efc3fc1263ad1'/>
<id>urn:sha1:8f40f672e6bb071812f61bfbd30efc3fc1263ad1</id>
<content type='text'>
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: fix error path during early mount
  9p: make cryptic unknown error from server less scary
  9p: fix flags length in net
  9p: Correct fidpool creation failure in p9_client_create
  9p: use struct mutex instead of struct semaphore
  9p: propagate parse_option changes to client and transports
  fs/9p/v9fs.c (v9fs_parse_options): Handle kstrdup and match_strdup failure.
  9p: Documentation updates
  add match_strlcpy() us it to make v9fs make uname and remotename parsing more robust
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6</title>
<updated>2008-05-15T02:11:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-05-15T02:11:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8978a318837d7acefca82645017c0534aeba5a36'/>
<id>urn:sha1:8978a318837d7acefca82645017c0534aeba5a36</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Use a TS_RESTORE_SIGMASK
  lmb: Make lmb debugging more useful.
  lmb: Fix inconsistent alignment of size argument.
  sparc: Fix mremap address range validation.
</content>
</entry>
<entry>
<title>lib: create common ascii hex array</title>
<updated>2008-05-15T02:11:14Z</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-05-14T23:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3fc957721d18c93662f7d4dab455b80f53dd2641'/>
<id>urn:sha1:3fc957721d18c93662f7d4dab455b80f53dd2641</id>
<content type='text'>
Add a common hex array in hexdump.c so everyone can use it.

Add a common hi/lo helper to avoid the shifting masking that is
done to get the upper and lower nibbles of a byte value.

Pull the pack_hex_byte helper from kgdb as it is opencoded many
places in the tree that will be consolidated.

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&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>
<entry>
<title>add match_strlcpy() us it to make v9fs make uname and remotename parsing more robust</title>
<updated>2008-05-15T00:23:25Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2008-02-26T15:57:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b32a09db4fb9a87246ba4e7726a979ac4709ad97'/>
<id>urn:sha1:b32a09db4fb9a87246ba4e7726a979ac4709ad97</id>
<content type='text'>
match_strcpy() is a somewhat creepy function: the caller needs to make sure
that the destination buffer is big enough, and when he screws up or
forgets, match_strcpy() happily overruns the buffer.

There's exactly one customer: v9fs_parse_options().  I believe it currently
can't overflow its buffer, but that's not exactly obvious.

The source string is a substing of the mount options.  The kernel silently
truncates those to PAGE_SIZE bytes, including the terminating zero.  See
compat_sys_mount() and do_mount().

The destination buffer is obtained from __getname(), which allocates from
name_cachep, which is initialized by vfs_caches_init() for size PATH_MAX.

We're safe as long as PATH_MAX &lt;= PAGE_SIZE.  PATH_MAX is 4096.  As far as
I know, the smallest PAGE_SIZE is also 4096.

Here's a patch that makes the code a bit more obviously correct.  It
doesn't depend on PATH_MAX &lt;= PAGE_SIZE.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Cc: Jim Meyering &lt;meyering@redhat.com&gt;
Cc: "Randy.Dunlap" &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
</content>
</entry>
<entry>
<title>cpumask: remove bitmap_scnprintf_len and cpumask_scnprintf_len</title>
<updated>2008-05-13T15:02:25Z</updated>
<author>
<name>Paul Jackson</name>
<email>pj@sgi.com</email>
</author>
<published>2008-05-12T21:02:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f4ed0deae8983591264d0e194e168ef65f4775f5'/>
<id>urn:sha1:f4ed0deae8983591264d0e194e168ef65f4775f5</id>
<content type='text'>
They aren't used.  They were briefly used as part of some other patches to
provide an alternative format for displaying some /proc and /sys cpumasks.
They probably should have been removed when those other patches were dropped,
in favor of a different solution.

Signed-off-by: Paul Jackson &lt;pj@sgi.com&gt;
Cc: "Mike Travis" &lt;travis@sgi.com&gt;
Cc: "Bert Wesarg" &lt;bert.wesarg@googlemail.com&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: WANG Cong &lt;xiyou.wangcong@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>
