<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v2.6.35</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v2.6.35</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v2.6.35'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-08-01T22:10:01Z</updated>
<entry>
<title>NFS: Fix a typo in include/linux/nfs_fs.h</title>
<updated>2010-08-01T22:10:01Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2010-08-01T17:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=77a63f3d1e0a3e7ede8d10f569e8481b13ff47c5'/>
<id>urn:sha1:77a63f3d1e0a3e7ede8d10f569e8481b13ff47c5</id>
<content type='text'>
nfs_commit_inode() needs to be defined irrespectively of whether or not
we are supporting NFSv3 and NFSv4.

Allow the compiler to optimise away code in the NFSv2-only case by
converting it into an inlined stub function.

Reported-and-tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6</title>
<updated>2010-07-31T02:02:21Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-07-31T02:02:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fc71ff8a6c187ecc1ba79ee5688668af97a970fc'/>
<id>urn:sha1:fc71ff8a6c187ecc1ba79ee5688668af97a970fc</id>
<content type='text'>
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFS: Ensure that writepage respects the nonblock flag
  NFS: kswapd must not block in nfs_release_page
  nfs: include space for the NUL in root path
</content>
</entry>
<entry>
<title>CIFS: Remove __exit mark from cifs_exit_dns_resolver()</title>
<updated>2010-07-31T01:56:09Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2010-07-30T14:25:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=51c20fcced5badee0e2021c6c89f44aa3cbd72aa'/>
<id>urn:sha1:51c20fcced5badee0e2021c6c89f44aa3cbd72aa</id>
<content type='text'>
Remove the __exit mark from cifs_exit_dns_resolver() as it's called by the
module init routine in case of error, and so may have been discarded during
linkage.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>NFS: Ensure that writepage respects the nonblock flag</title>
<updated>2010-07-30T19:38:56Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2010-07-30T19:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cfb506e1d330387dfaf334dd493b3773d388863d'/>
<id>urn:sha1:cfb506e1d330387dfaf334dd493b3773d388863d</id>
<content type='text'>
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: kswapd must not block in nfs_release_page</title>
<updated>2010-07-30T19:38:42Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2010-07-30T19:31:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b608b283a962caaa280756bc8563016a71712acf'/>
<id>urn:sha1:b608b283a962caaa280756bc8563016a71712acf</id>
<content type='text'>
See https://bugzilla.kernel.org/show_bug.cgi?id=16056

If other processes are blocked waiting for kswapd to free up some memory so
that they can make progress, then we cannot allow kswapd to block on those
processes.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>nfs: include space for the NUL in root path</title>
<updated>2010-07-30T19:33:39Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-07-13T11:34:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=674b2222920012244ca59978b356b25412a8dcc7'/>
<id>urn:sha1:674b2222920012244ca59978b356b25412a8dcc7</id>
<content type='text'>
In root_nfs_name() it does the following:

        if (strlen(buf) + strlen(cp) &gt; NFS_MAXPATHLEN) {
                printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n");
                return -1;
        }
        sprintf(nfs_export_path, buf, cp);

In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN)
then the sprintf() would lead to an overflow.  Generally the rest of the
code assumes that the path can have NFS_MAXPATHLEN (1024) characters and
a NUL terminator so the fix is to add space to the nfs_export_path[]
buffer.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>CRED: Fix get_task_cred() and task_state() to not resurrect dead credentials</title>
<updated>2010-07-29T22:16:17Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2010-07-29T11:45:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=de09a9771a5346029f4d11e4ac886be7f9bfdd75'/>
<id>urn:sha1:de09a9771a5346029f4d11e4ac886be7f9bfdd75</id>
<content type='text'>
It's possible for get_task_cred() as it currently stands to 'corrupt' a set of
credentials by incrementing their usage count after their replacement by the
task being accessed.

What happens is that get_task_cred() can race with commit_creds():

	TASK_1			TASK_2			RCU_CLEANER
	--&gt;get_task_cred(TASK_2)
	rcu_read_lock()
	__cred = __task_cred(TASK_2)
				--&gt;commit_creds()
				old_cred = TASK_2-&gt;real_cred
				TASK_2-&gt;real_cred = ...
				put_cred(old_cred)
				  call_rcu(old_cred)
		[__cred-&gt;usage == 0]
	get_cred(__cred)
		[__cred-&gt;usage == 1]
	rcu_read_unlock()
							--&gt;put_cred_rcu()
							[__cred-&gt;usage == 1]
							panic()

However, since a tasks credentials are generally not changed very often, we can
reasonably make use of a loop involving reading the creds pointer and using
atomic_inc_not_zero() to attempt to increment it if it hasn't already hit zero.

If successful, we can safely return the credentials in the knowledge that, even
if the task we're accessing has released them, they haven't gone to the RCU
cleanup code.

We then change task_state() in procfs to use get_task_cred() rather than
calling get_cred() on the result of __task_cred(), as that suffers from the
same problem.

Without this change, a BUG_ON in __put_cred() or in put_cred_rcu() can be
tripped when it is noticed that the usage count is not zero as it ought to be,
for example:

kernel BUG at kernel/cred.c:168!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/kernel/mm/ksm/run
CPU 0
Pid: 2436, comm: master Not tainted 2.6.33.3-85.fc13.x86_64 #1 0HR330/OptiPlex
745
RIP: 0010:[&lt;ffffffff81069881&gt;]  [&lt;ffffffff81069881&gt;] __put_cred+0xc/0x45
RSP: 0018:ffff88019e7e9eb8  EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff880161514480 RCX: 00000000ffffffff
RDX: 00000000ffffffff RSI: ffff880140c690c0 RDI: ffff880140c690c0
RBP: ffff88019e7e9eb8 R08: 00000000000000d0 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000040 R12: ffff880140c690c0
R13: ffff88019e77aea0 R14: 00007fff336b0a5c R15: 0000000000000001
FS:  00007f12f50d97c0(0000) GS:ffff880007400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8f461bc000 CR3: 00000001b26ce000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process master (pid: 2436, threadinfo ffff88019e7e8000, task ffff88019e77aea0)
Stack:
 ffff88019e7e9ec8 ffffffff810698cd ffff88019e7e9ef8 ffffffff81069b45
&lt;0&gt; ffff880161514180 ffff880161514480 ffff880161514180 0000000000000000
&lt;0&gt; ffff88019e7e9f28 ffffffff8106aace 0000000000000001 0000000000000246
Call Trace:
 [&lt;ffffffff810698cd&gt;] put_cred+0x13/0x15
 [&lt;ffffffff81069b45&gt;] commit_creds+0x16b/0x175
 [&lt;ffffffff8106aace&gt;] set_current_groups+0x47/0x4e
 [&lt;ffffffff8106ac89&gt;] sys_setgroups+0xf6/0x105
 [&lt;ffffffff81009b02&gt;] system_call_fastpath+0x16/0x1b
Code: 48 8d 71 ff e8 7e 4e 15 00 85 c0 78 0b 8b 75 ec 48 89 df e8 ef 4a 15 00
48 83 c4 18 5b c9 c3 55 8b 07 8b 07 48 89 e5 85 c0 74 04 &lt;0f&gt; 0b eb fe 65 48 8b
04 25 00 cc 00 00 48 3b b8 58 04 00 00 75
RIP  [&lt;ffffffff81069881&gt;] __put_cred+0xc/0x45
 RSP &lt;ffff88019e7e9eb8&gt;
---[ end trace df391256a100ebdd ]---

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ecryptfs: Bugfix for error related to ecryptfs_hash_buckets</title>
<updated>2010-07-29T02:59:24Z</updated>
<author>
<name>Andre Osterhues</name>
<email>aosterhues@escrypt.com</email>
</author>
<published>2010-07-13T20:59:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a6f80fb7b5986fda663d94079d3bba0937a6b6ff'/>
<id>urn:sha1:a6f80fb7b5986fda663d94079d3bba0937a6b6ff</id>
<content type='text'>
The function ecryptfs_uid_hash wrongly assumes that the
second parameter to hash_long() is the number of hash
buckets instead of the number of hash bits.
This patch fixes that and renames the variable
ecryptfs_hash_buckets to ecryptfs_hash_bits to make it
clearer.

Fixes: CVE-2010-2492

Signed-off-by: Andre Osterhues &lt;aosterhues@escrypt.com&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client</title>
<updated>2010-07-28T18:10:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-07-28T18:10:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6c50e1a49b4377b760ee46f824ed04b17be913e3'/>
<id>urn:sha1:6c50e1a49b4377b760ee46f824ed04b17be913e3</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: use complete_all and wake_up_all
  ceph: Correct obvious typo of Kconfig variable "CRYPTO_AES"
  ceph: fix dentry lease release
  ceph: fix leak of dentry in ceph_init_dentry() error path
  ceph: fix pg_mapping leak on pg_temp updates
  ceph: fix d_release dop for snapdir, snapped dentries
  ceph: avoid dcache readdir for snapdir
</content>
</entry>
<entry>
<title>GFS2: Use kmalloc when possible for -&gt;readdir()</title>
<updated>2010-07-28T18:10:03Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2010-07-28T16:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d2a97a4e99ff0ffdccd1fc46f22fb34270ef1e56'/>
<id>urn:sha1:d2a97a4e99ff0ffdccd1fc46f22fb34270ef1e56</id>
<content type='text'>
If we don't need a huge amount of memory in -&gt;readdir() then
we can use kmalloc rather than vmalloc to allocate it. This
should cut down on the greater overheads associated with
vmalloc for smaller directories.

We may be able to eliminate vmalloc entirely at some stage,
but this is easy to do right away.

Also using GFP_NOFS to avoid any issues wrt to deleting inodes
while under a glock, and suggestion from Linus to factor out
the alloc/dealloc.

I've given this a test with a variety of different sized
directories and it seems to work ok.

Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
