<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/include/linux/nfs_fs.h, branch v3.14.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Merge tag 'nfs-for-3.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2014-01-31T23:39:07+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-01-31T23:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8a1f006ad302ea178aefb1f8c67e679c696289e9'/>
<id>8a1f006ad302ea178aefb1f8c67e679c696289e9</id>
<content type='text'>
Pull NFS client bugfixes from Trond Myklebust:
 "Highlights:

   - Fix several races in nfs_revalidate_mapping
   - NFSv4.1 slot leakage in the pNFS files driver
   - Stable fix for a slot leak in nfs40_sequence_done
   - Don't reject NFSv4 servers that support ACLs with only ALLOW aces"

* tag 'nfs-for-3.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  nfs: initialize the ACL support bits to zero.
  NFSv4.1: Cleanup
  NFSv4.1: Clean up nfs41_sequence_done
  NFSv4: Fix a slot leak in nfs40_sequence_done
  NFSv4.1 free slot before resending I/O to MDS
  nfs: add memory barriers around NFS_INO_INVALID_DATA and NFS_INO_INVALIDATING
  NFS: Fix races in nfs_revalidate_mapping
  sunrpc: turn warn_gssd() log message into a dprintk()
  NFS: fix the handling of NFS_INO_INVALID_DATA flag in nfs_revalidate_mapping
  nfs: handle servers that support only ALLOW ACE type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull NFS client bugfixes from Trond Myklebust:
 "Highlights:

   - Fix several races in nfs_revalidate_mapping
   - NFSv4.1 slot leakage in the pNFS files driver
   - Stable fix for a slot leak in nfs40_sequence_done
   - Don't reject NFSv4 servers that support ACLs with only ALLOW aces"

* tag 'nfs-for-3.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  nfs: initialize the ACL support bits to zero.
  NFSv4.1: Cleanup
  NFSv4.1: Clean up nfs41_sequence_done
  NFSv4: Fix a slot leak in nfs40_sequence_done
  NFSv4.1 free slot before resending I/O to MDS
  nfs: add memory barriers around NFS_INO_INVALID_DATA and NFS_INO_INVALIDATING
  NFS: Fix races in nfs_revalidate_mapping
  sunrpc: turn warn_gssd() log message into a dprintk()
  NFS: fix the handling of NFS_INO_INVALID_DATA flag in nfs_revalidate_mapping
  nfs: handle servers that support only ALLOW ACE type.
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: fix the handling of NFS_INO_INVALID_DATA flag in nfs_revalidate_mapping</title>
<updated>2014-01-27T20:35:56+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2014-01-27T18:46:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d529ef83c355f97027ff85298a9709fe06216a66'/>
<id>d529ef83c355f97027ff85298a9709fe06216a66</id>
<content type='text'>
There is a possible race in how the nfs_invalidate_mapping function is
handled.  Currently, we go and invalidate the pages in the file and then
clear NFS_INO_INVALID_DATA.

The problem is that it's possible for a stale page to creep into the
mapping after the page was invalidated (i.e., via readahead). If another
writer comes along and sets the flag after that happens but before
invalidate_inode_pages2 returns then we could clear the flag
without the cache having been properly invalidated.

So, we must clear the flag first and then invalidate the pages. Doing
this however, opens another race:

It's possible to have two concurrent read() calls that end up in
nfs_revalidate_mapping at the same time. The first one clears the
NFS_INO_INVALID_DATA flag and then goes to call nfs_invalidate_mapping.

Just before calling that though, the other task races in, checks the
flag and finds it cleared. At that point, it trusts that the mapping is
good and gets the lock on the page, allowing the read() to be satisfied
from the cache even though the data is no longer valid.

These effects are easily manifested by running diotest3 from the LTP
test suite on NFS. That program does a series of DIO writes and buffered
reads. The operations are serialized and page-aligned but the existing
code fails the test since it occasionally allows a read to come out of
the cache incorrectly. While mixing direct and buffered I/O isn't
recommended, I believe it's possible to hit this in other ways that just
use buffered I/O, though that situation is much harder to reproduce.

The problem is that the checking/clearing of that flag and the
invalidation of the mapping really need to be atomic. Fix this by
serializing concurrent invalidations with a bitlock.

At the same time, we also need to allow other places that check
NFS_INO_INVALID_DATA to check whether we might be in the middle of
invalidating the file, so fix up a couple of places that do that
to look for the new NFS_INO_INVALIDATING flag.

Doing this requires us to be careful not to set the bitlock
unnecessarily, so this code only does that if it believes it will
be doing an invalidation.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a possible race in how the nfs_invalidate_mapping function is
handled.  Currently, we go and invalidate the pages in the file and then
clear NFS_INO_INVALID_DATA.

The problem is that it's possible for a stale page to creep into the
mapping after the page was invalidated (i.e., via readahead). If another
writer comes along and sets the flag after that happens but before
invalidate_inode_pages2 returns then we could clear the flag
without the cache having been properly invalidated.

So, we must clear the flag first and then invalidate the pages. Doing
this however, opens another race:

It's possible to have two concurrent read() calls that end up in
nfs_revalidate_mapping at the same time. The first one clears the
NFS_INO_INVALID_DATA flag and then goes to call nfs_invalidate_mapping.

Just before calling that though, the other task races in, checks the
flag and finds it cleared. At that point, it trusts that the mapping is
good and gets the lock on the page, allowing the read() to be satisfied
from the cache even though the data is no longer valid.

These effects are easily manifested by running diotest3 from the LTP
test suite on NFS. That program does a series of DIO writes and buffered
reads. The operations are serialized and page-aligned but the existing
code fails the test since it occasionally allows a read to come out of
the cache incorrectly. While mixing direct and buffered I/O isn't
recommended, I believe it's possible to hit this in other ways that just
use buffered I/O, though that situation is much harder to reproduce.

The problem is that the checking/clearing of that flag and the
invalidation of the mapping really need to be atomic. Fix this by
serializing concurrent invalidations with a bitlock.

At the same time, we also need to allow other places that check
NFS_INO_INVALID_DATA to check whether we might be in the middle of
invalidating the file, so fix up a couple of places that do that
to look for the new NFS_INO_INVALIDATING flag.

Doing this requires us to be careful not to set the bitlock
unnecessarily, so this code only does that if it believes it will
be doing an invalidation.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs: use generic posix ACL infrastructure for v3 Posix ACLs</title>
<updated>2014-01-26T13:26:20+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2013-12-20T13:16:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=013cdf1088d7235da9477a2375654921d9b9ba9f'/>
<id>013cdf1088d7235da9477a2375654921d9b9ba9f</id>
<content type='text'>
This causes a small behaviour change in that we don't bother to set
ACLs on file creation if the mode bit can express the access permissions
fully, and thus behaving identical to local filesystems.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This causes a small behaviour change in that we don't bother to set
ACLs on file creation if the mode bit can express the access permissions
fully, and thus behaving identical to local filesystems.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Enabling v4.2 should not recompile nfsd and lockd</title>
<updated>2013-11-19T21:20:40+00:00</updated>
<author>
<name>Anna Schumaker</name>
<email>bjschuma@netapp.com</email>
</author>
<published>2013-11-13T17:29:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=694e096fd7c2a7d40760fc9c9dfc826bdd495ea4'/>
<id>694e096fd7c2a7d40760fc9c9dfc826bdd495ea4</id>
<content type='text'>
When CONFIG_NFS_V4_2 is toggled nfsd and lockd will be recompiled,
instead of only the nfs client.  This patch moves a small amount of code
into the client directory to avoid unnecessary recompiles.

Signed-off-by: Anna Schumaker &lt;bjschuma@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When CONFIG_NFS_V4_2 is toggled nfsd and lockd will be recompiled,
instead of only the nfs client.  This patch moves a small amount of code
into the client directory to avoid unnecessary recompiles.

Signed-off-by: Anna Schumaker &lt;bjschuma@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Use i_writecount to control whether to get an fscache cookie in nfs_open()</title>
<updated>2013-09-27T17:40:25+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-09-27T10:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f1fe29b4a02d0805aa7d0ff6b73410a9f9316d69'/>
<id>f1fe29b4a02d0805aa7d0ff6b73410a9f9316d69</id>
<content type='text'>
Use i_writecount to control whether to get an fscache cookie in nfs_open() as
NFS does not do write caching yet.  I *think* this is the cause of a problem
encountered by Mark Moseley whereby __fscache_uncache_page() gets a NULL
pointer dereference because cookie-&gt;def is NULL:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
IP: [&lt;ffffffff812a1903&gt;] __fscache_uncache_page+0x23/0x160
PGD 0
Thread overran stack, or stack corrupted
Oops: 0000 [#1] SMP
Modules linked in: ...
CPU: 7 PID: 18993 Comm: php Not tainted 3.11.1 #1
Hardware name: Dell Inc. PowerEdge R420/072XWF, BIOS 1.3.5 08/21/2012
task: ffff8804203460c0 ti: ffff880420346640
RIP: 0010:[&lt;ffffffff812a1903&gt;] __fscache_uncache_page+0x23/0x160
RSP: 0018:ffff8801053af878 EFLAGS: 00210286
RAX: 0000000000000000 RBX: ffff8800be2f8780 RCX: ffff88022ffae5e8
RDX: 0000000000004c66 RSI: ffffea00055ff440 RDI: ffff8800be2f8780
RBP: ffff8801053af898 R08: 0000000000000001 R09: 0000000000000003
R10: 0000000000000000 R11: 0000000000000000 R12: ffffea00055ff440
R13: 0000000000001000 R14: ffff8800c50be538 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff88042fc60000(0063) knlGS:00000000e439c700
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000000000010 CR3: 0000000001d8f000 CR4: 00000000000607f0
Stack:
...
Call Trace:
[&lt;ffffffff81365a72&gt;] __nfs_fscache_invalidate_page+0x42/0x70
[&lt;ffffffff813553d5&gt;] nfs_invalidate_page+0x75/0x90
[&lt;ffffffff811b8f5e&gt;] truncate_inode_page+0x8e/0x90
[&lt;ffffffff811b90ad&gt;] truncate_inode_pages_range.part.12+0x14d/0x620
[&lt;ffffffff81d6387d&gt;] ? __mutex_lock_slowpath+0x1fd/0x2e0
[&lt;ffffffff811b95d3&gt;] truncate_inode_pages_range+0x53/0x70
[&lt;ffffffff811b969d&gt;] truncate_inode_pages+0x2d/0x40
[&lt;ffffffff811b96ff&gt;] truncate_pagecache+0x4f/0x70
[&lt;ffffffff81356840&gt;] nfs_setattr_update_inode+0xa0/0x120
[&lt;ffffffff81368de4&gt;] nfs3_proc_setattr+0xc4/0xe0
[&lt;ffffffff81357f78&gt;] nfs_setattr+0xc8/0x150
[&lt;ffffffff8122d95b&gt;] notify_change+0x1cb/0x390
[&lt;ffffffff8120a55b&gt;] do_truncate+0x7b/0xc0
[&lt;ffffffff8121f96c&gt;] do_last+0xa4c/0xfd0
[&lt;ffffffff8121ffbc&gt;] path_openat+0xcc/0x670
[&lt;ffffffff81220a0e&gt;] do_filp_open+0x4e/0xb0
[&lt;ffffffff8120ba1f&gt;] do_sys_open+0x13f/0x2b0
[&lt;ffffffff8126aaf6&gt;] compat_SyS_open+0x36/0x50
[&lt;ffffffff81d7204c&gt;] sysenter_dispatch+0x7/0x24

The code at the instruction pointer was disassembled:

&gt; (gdb) disas __fscache_uncache_page
&gt; Dump of assembler code for function __fscache_uncache_page:
&gt; ...
&gt; 0xffffffff812a18ff &lt;+31&gt;: mov 0x48(%rbx),%rax
&gt; 0xffffffff812a1903 &lt;+35&gt;: cmpb $0x0,0x10(%rax)
&gt; 0xffffffff812a1907 &lt;+39&gt;: je 0xffffffff812a19cd &lt;__fscache_uncache_page+237&gt;

These instructions make up:

	ASSERTCMP(cookie-&gt;def-&gt;type, !=, FSCACHE_COOKIE_TYPE_INDEX);

That cmpb is the faulting instruction (%rax is 0).  So cookie-&gt;def is NULL -
which presumably means that the cookie has already been at least partway
through __fscache_relinquish_cookie().

What I think may be happening is something like a three-way race on the same
file:

	PROCESS 1	PROCESS 2	PROCESS 3
	===============	===============	===============
	open(O_TRUNC|O_WRONLY)
			open(O_RDONLY)
					open(O_WRONLY)
	--&gt;nfs_open()
	--&gt;nfs_fscache_set_inode_cookie()
	nfs_fscache_inode_lock()
	nfs_fscache_disable_inode_cookie()
	__fscache_relinquish_cookie()
	nfs_inode-&gt;fscache = NULL
	&lt;--nfs_fscache_set_inode_cookie()

			--&gt;nfs_open()
			--&gt;nfs_fscache_set_inode_cookie()
			nfs_fscache_inode_lock()
			nfs_fscache_enable_inode_cookie()
			__fscache_acquire_cookie()
			nfs_inode-&gt;fscache = cookie
			&lt;--nfs_fscache_set_inode_cookie()
	&lt;--nfs_open()
	--&gt;nfs_setattr()
	...
	...
	--&gt;nfs_invalidate_page()
	--&gt;__nfs_fscache_invalidate_page()
	cookie = nfsi-&gt;fscache
					--&gt;nfs_open()
					--&gt;nfs_fscache_set_inode_cookie()
					nfs_fscache_inode_lock()
					nfs_fscache_disable_inode_cookie()
					--&gt;__fscache_relinquish_cookie()
	--&gt;__fscache_uncache_page(cookie)
	&lt;crash&gt;
					&lt;--__fscache_relinquish_cookie()
					nfs_inode-&gt;fscache = NULL
					&lt;--nfs_fscache_set_inode_cookie()

What is needed is something to prevent process #2 from reacquiring the cookie
- and I think checking i_writecount should do the trick.

It's also possible to have a two-way race on this if the file is opened
O_TRUNC|O_RDONLY instead.

Reported-by: Mark Moseley &lt;moseleymark@gmail.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use i_writecount to control whether to get an fscache cookie in nfs_open() as
NFS does not do write caching yet.  I *think* this is the cause of a problem
encountered by Mark Moseley whereby __fscache_uncache_page() gets a NULL
pointer dereference because cookie-&gt;def is NULL:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
IP: [&lt;ffffffff812a1903&gt;] __fscache_uncache_page+0x23/0x160
PGD 0
Thread overran stack, or stack corrupted
Oops: 0000 [#1] SMP
Modules linked in: ...
CPU: 7 PID: 18993 Comm: php Not tainted 3.11.1 #1
Hardware name: Dell Inc. PowerEdge R420/072XWF, BIOS 1.3.5 08/21/2012
task: ffff8804203460c0 ti: ffff880420346640
RIP: 0010:[&lt;ffffffff812a1903&gt;] __fscache_uncache_page+0x23/0x160
RSP: 0018:ffff8801053af878 EFLAGS: 00210286
RAX: 0000000000000000 RBX: ffff8800be2f8780 RCX: ffff88022ffae5e8
RDX: 0000000000004c66 RSI: ffffea00055ff440 RDI: ffff8800be2f8780
RBP: ffff8801053af898 R08: 0000000000000001 R09: 0000000000000003
R10: 0000000000000000 R11: 0000000000000000 R12: ffffea00055ff440
R13: 0000000000001000 R14: ffff8800c50be538 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff88042fc60000(0063) knlGS:00000000e439c700
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000000000010 CR3: 0000000001d8f000 CR4: 00000000000607f0
Stack:
...
Call Trace:
[&lt;ffffffff81365a72&gt;] __nfs_fscache_invalidate_page+0x42/0x70
[&lt;ffffffff813553d5&gt;] nfs_invalidate_page+0x75/0x90
[&lt;ffffffff811b8f5e&gt;] truncate_inode_page+0x8e/0x90
[&lt;ffffffff811b90ad&gt;] truncate_inode_pages_range.part.12+0x14d/0x620
[&lt;ffffffff81d6387d&gt;] ? __mutex_lock_slowpath+0x1fd/0x2e0
[&lt;ffffffff811b95d3&gt;] truncate_inode_pages_range+0x53/0x70
[&lt;ffffffff811b969d&gt;] truncate_inode_pages+0x2d/0x40
[&lt;ffffffff811b96ff&gt;] truncate_pagecache+0x4f/0x70
[&lt;ffffffff81356840&gt;] nfs_setattr_update_inode+0xa0/0x120
[&lt;ffffffff81368de4&gt;] nfs3_proc_setattr+0xc4/0xe0
[&lt;ffffffff81357f78&gt;] nfs_setattr+0xc8/0x150
[&lt;ffffffff8122d95b&gt;] notify_change+0x1cb/0x390
[&lt;ffffffff8120a55b&gt;] do_truncate+0x7b/0xc0
[&lt;ffffffff8121f96c&gt;] do_last+0xa4c/0xfd0
[&lt;ffffffff8121ffbc&gt;] path_openat+0xcc/0x670
[&lt;ffffffff81220a0e&gt;] do_filp_open+0x4e/0xb0
[&lt;ffffffff8120ba1f&gt;] do_sys_open+0x13f/0x2b0
[&lt;ffffffff8126aaf6&gt;] compat_SyS_open+0x36/0x50
[&lt;ffffffff81d7204c&gt;] sysenter_dispatch+0x7/0x24

The code at the instruction pointer was disassembled:

&gt; (gdb) disas __fscache_uncache_page
&gt; Dump of assembler code for function __fscache_uncache_page:
&gt; ...
&gt; 0xffffffff812a18ff &lt;+31&gt;: mov 0x48(%rbx),%rax
&gt; 0xffffffff812a1903 &lt;+35&gt;: cmpb $0x0,0x10(%rax)
&gt; 0xffffffff812a1907 &lt;+39&gt;: je 0xffffffff812a19cd &lt;__fscache_uncache_page+237&gt;

These instructions make up:

	ASSERTCMP(cookie-&gt;def-&gt;type, !=, FSCACHE_COOKIE_TYPE_INDEX);

That cmpb is the faulting instruction (%rax is 0).  So cookie-&gt;def is NULL -
which presumably means that the cookie has already been at least partway
through __fscache_relinquish_cookie().

What I think may be happening is something like a three-way race on the same
file:

	PROCESS 1	PROCESS 2	PROCESS 3
	===============	===============	===============
	open(O_TRUNC|O_WRONLY)
			open(O_RDONLY)
					open(O_WRONLY)
	--&gt;nfs_open()
	--&gt;nfs_fscache_set_inode_cookie()
	nfs_fscache_inode_lock()
	nfs_fscache_disable_inode_cookie()
	__fscache_relinquish_cookie()
	nfs_inode-&gt;fscache = NULL
	&lt;--nfs_fscache_set_inode_cookie()

			--&gt;nfs_open()
			--&gt;nfs_fscache_set_inode_cookie()
			nfs_fscache_inode_lock()
			nfs_fscache_enable_inode_cookie()
			__fscache_acquire_cookie()
			nfs_inode-&gt;fscache = cookie
			&lt;--nfs_fscache_set_inode_cookie()
	&lt;--nfs_open()
	--&gt;nfs_setattr()
	...
	...
	--&gt;nfs_invalidate_page()
	--&gt;__nfs_fscache_invalidate_page()
	cookie = nfsi-&gt;fscache
					--&gt;nfs_open()
					--&gt;nfs_fscache_set_inode_cookie()
					nfs_fscache_inode_lock()
					nfs_fscache_disable_inode_cookie()
					--&gt;__fscache_relinquish_cookie()
	--&gt;__fscache_uncache_page(cookie)
	&lt;crash&gt;
					&lt;--__fscache_relinquish_cookie()
					nfs_inode-&gt;fscache = NULL
					&lt;--nfs_fscache_set_inode_cookie()

What is needed is something to prevent process #2 from reacquiring the cookie
- and I think checking i_writecount should do the trick.

It's also possible to have a two-way race on this if the file is opened
O_TRUNC|O_RDONLY instead.

Reported-by: Mark Moseley &lt;moseleymark@gmail.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Ensure that rmdir() waits for sillyrenames to complete</title>
<updated>2013-09-03T19:26:29+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-08-30T16:24:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ba6c05928dcafc7e0a0c8e4ee6a293ba47190fd4'/>
<id>ba6c05928dcafc7e0a0c8e4ee6a293ba47190fd4</id>
<content type='text'>
If an NFS client does

	mkdir("dir");
	fd = open("dir/file");
	unlink("dir/file");
	close(fd);
	rmdir("dir");

then the asynchronous nature of the sillyrename operation means that
we can end up getting EBUSY for the rmdir() in the above test. Fix
that by ensuring that we wait for any in-progress sillyrenames
before sending the rmdir() to the server.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If an NFS client does

	mkdir("dir");
	fd = open("dir/file");
	unlink("dir/file");
	close(fd);
	rmdir("dir");

then the asynchronous nature of the sillyrename operation means that
we can end up getting EBUSY for the rmdir() in the above test. Fix
that by ensuring that we wait for any in-progress sillyrenames
before sending the rmdir() to the server.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Make nfs_attribute_cache_expired() non-static</title>
<updated>2013-07-09T21:17:07+00:00</updated>
<author>
<name>Scott Mayhew</name>
<email>smayhew@redhat.com</email>
</author>
<published>2013-07-05T21:49:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=43f291cd0754f8f10c2cd701e014936f708dab59'/>
<id>43f291cd0754f8f10c2cd701e014936f708dab59</id>
<content type='text'>
NFS: Make nfs_attribute_cache_expired() non-static so we can call it from
nfs_readdir().

Signed-off-by: Scott Mayhew &lt;smayhew@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NFS: Make nfs_attribute_cache_expired() non-static so we can call it from
nfs_readdir().

Signed-off-by: Scott Mayhew &lt;smayhew@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'labeled-nfs' into linux-next</title>
<updated>2013-06-28T20:29:51+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-06-28T20:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=959d921f5eb8878ea16049a7f6e9bcbb6dfbcb88'/>
<id>959d921f5eb8878ea16049a7f6e9bcbb6dfbcb88</id>
<content type='text'>
* labeled-nfs:
  NFS: Apply v4.1 capabilities to v4.2
  NFS: Add in v4.2 callback operation
  NFS: Make callbacks minor version generic
  Kconfig: Add Kconfig entry for Labeled NFS V4 client
  NFS: Extend NFS xattr handlers to accept the security namespace
  NFS: Client implementation of Labeled-NFS
  NFS: Add label lifecycle management
  NFS:Add labels to client function prototypes
  NFSv4: Extend fattr bitmaps to support all 3 words
  NFSv4: Introduce new label structure
  NFSv4: Add label recommended attribute and NFSv4 flags
  NFSv4.2: Added NFS v4.2 support to the NFS client
  SELinux: Add new labeling type native labels
  LSM: Add flags field to security_sb_set_mnt_opts for in kernel mount data.
  Security: Add Hook to test if the particular xattr is part of a MAC model.
  Security: Add hook to calculate context based on a negative dentry.
  NFS: Add NFSv4.2 protocol constants

Conflicts:
	fs/nfs/nfs4proc.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* labeled-nfs:
  NFS: Apply v4.1 capabilities to v4.2
  NFS: Add in v4.2 callback operation
  NFS: Make callbacks minor version generic
  Kconfig: Add Kconfig entry for Labeled NFS V4 client
  NFS: Extend NFS xattr handlers to accept the security namespace
  NFS: Client implementation of Labeled-NFS
  NFS: Add label lifecycle management
  NFS:Add labels to client function prototypes
  NFSv4: Extend fattr bitmaps to support all 3 words
  NFSv4: Introduce new label structure
  NFSv4: Add label recommended attribute and NFSv4 flags
  NFSv4.2: Added NFS v4.2 support to the NFS client
  SELinux: Add new labeling type native labels
  LSM: Add flags field to security_sb_set_mnt_opts for in kernel mount data.
  Security: Add Hook to test if the particular xattr is part of a MAC model.
  Security: Add hook to calculate context based on a negative dentry.
  NFS: Add NFSv4.2 protocol constants

Conflicts:
	fs/nfs/nfs4proc.c
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Client implementation of Labeled-NFS</title>
<updated>2013-06-08T20:20:16+00:00</updated>
<author>
<name>David Quigley</name>
<email>dpquigl@davequigley.com</email>
</author>
<published>2013-05-22T16:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=aa9c2669626ca7e5e5bab28e6caeb583fd40099b'/>
<id>aa9c2669626ca7e5e5bab28e6caeb583fd40099b</id>
<content type='text'>
This patch implements the client transport and handling support for labeled
NFS. The patch adds two functions to encode and decode the security label
recommended attribute which makes use of the LSM hooks added earlier. It also
adds code to grab the label from the file attribute structures and encode the
label to be sent back to the server.

Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: Matthew N. Dodd &lt;Matthew.Dodd@sparta.com&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements the client transport and handling support for labeled
NFS. The patch adds two functions to encode and decode the security label
recommended attribute which makes use of the LSM hooks added earlier. It also
adds code to grab the label from the file attribute structures and encode the
label to be sent back to the server.

Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: Matthew N. Dodd &lt;Matthew.Dodd@sparta.com&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS:Add labels to client function prototypes</title>
<updated>2013-06-08T20:20:15+00:00</updated>
<author>
<name>David Quigley</name>
<email>dpquigl@davequigley.com</email>
</author>
<published>2013-05-22T16:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1775fd3e805b6a852ef376256967de69284d7962'/>
<id>1775fd3e805b6a852ef376256967de69284d7962</id>
<content type='text'>
After looking at all of the nfsv4 operations the label structure has been added
to the prototypes of the functions which can transmit label data.

Signed-off-by: Matthew N. Dodd &lt;Matthew.Dodd@sparta.com&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After looking at all of the nfsv4 operations the label structure has been added
to the prototypes of the functions which can transmit label data.

Signed-off-by: Matthew N. Dodd &lt;Matthew.Dodd@sparta.com&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
