<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfsd, branch linux-2.6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2007-02-20T06:30:55Z</updated>
<entry>
<title>[PATCH] Fix a free-wrong-pointer bug in nfs/acl server (CVE-2007-0772)</title>
<updated>2007-02-20T06:30:55Z</updated>
<author>
<name>Greg Banks</name>
</author>
<published>2007-02-19T23:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c362497a5a1f24b961c1f51e9d1a51d9d5a1037'/>
<id>urn:sha1:2c362497a5a1f24b961c1f51e9d1a51d9d5a1037</id>
<content type='text'>
Due to type confusion, when an nfsacl verison 2 'ACCESS' request
finishes and tries to clean up, it calls fh_put on entiredly the
wrong thing and this can cause an oops.

Signed-off-by: Neil Brown &lt;neilb@suse.de&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>[PATCH] knfsd: fix up some bit-rot in exp_export</title>
<updated>2007-02-05T16:31:43Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2007-01-25T04:35:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92ad857a3c2e40b191c61d5afccdb20d74844766'/>
<id>urn:sha1:92ad857a3c2e40b191c61d5afccdb20d74844766</id>
<content type='text'>
The nfsservctl systemcall isn't used but recent nfs-utils releases for
exporting filesystems, and consequently the code that is uses -
exp_export - has suffered some bitrot.

Particular:
  - some newly added fields in 'struct svc_export' are being initialised
    properly.
  - the return value is now always -ENOMEM ...

This patch fixes both these problems.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] knfsd: fix type mismatch with filldir_t used by nfsd.</title>
<updated>2007-02-05T16:31:43Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2007-01-25T04:35:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dbd2bd734a5559fd167577e37498bad0b2f33d8a'/>
<id>urn:sha1:dbd2bd734a5559fd167577e37498bad0b2f33d8a</id>
<content type='text'>
nfsd defines a type 'encode_dent_fn' which is much like 'filldir_t'
except that the first pointer is 'struct readdir_cd *' rather than
'void *'.  It then casts encode_dent_fn points to 'filldir_t' as
needed.  This hides any other type mismatches between the two such as
the fact that the 'ino' arg recently changed from ino_t to u64.

So: get rid of 'encode_dent_fn', get rid of the cast of the function
type, change the first arg of various functions from 'struct readdir_cd *'
to 'void *', and live with the fact that we have a little less type
checking on the calling of these functions now.
Less internal (to nfsd) checking offset by more external checking, which
is more important.

Thanks to Gabriel Paubert &lt;paubert@iram.es&gt; for discovering this and
providing an initial patch.

Signed-off-by: Gabriel Paubert &lt;paubert@iram.es&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] knfsd: fix an NFSD bug with full sized, non-page-aligned reads.</title>
<updated>2007-02-05T16:31:43Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2007-01-25T04:35:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=79dab9e2b79871bdeb3ea23a882884a7a16d4c92'/>
<id>urn:sha1:79dab9e2b79871bdeb3ea23a882884a7a16d4c92</id>
<content type='text'>
NFSd assumes that largest number of pages that will be needed
for a request+response is 2+N where N pages is the size of the largest
permitted read/write request.  The '2' are 1 for the non-data part of
the request, and 1 for the non-data part of the reply.

However, when a read request is not page-aligned, and we choose to use
-&gt;sendfile to send it directly from the page cache, we may need N+1
pages to hold the whole reply.  This can overflow and array and cause
an Oops.

This patch increases size of the array for holding pages by one and
makes sure that entry is NULL when it is not in use.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] knfsd: fix setting of ACL server versions.</title>
<updated>2007-02-05T16:31:43Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2007-01-25T04:35:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65bd280c3e91096a291b77e5b2eed5a530851de7'/>
<id>urn:sha1:65bd280c3e91096a291b77e5b2eed5a530851de7</id>
<content type='text'>
Due to silly typos, if the nfs versions are explicitly set,
no NFSACL versions get enabled.

Also improve an error message that would have made this bug
a little easier to find.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] nfsd: fix spurious error return from nfsd_create in async case</title>
<updated>2006-11-09T02:29:25Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2006-11-09T01:44:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=088406bcf66d6c7fd8a5c04c00aa410ae9077403'/>
<id>urn:sha1:088406bcf66d6c7fd8a5c04c00aa410ae9077403</id>
<content type='text'>
Commit 6264d69d7df654ca64f625e9409189a0e50734e9 modified the nfsd_create()
error handling in such a way that nfsd_create will usually return
nfserr_perm even when succesful, if the export has the async export option.

This introduced a regression that could cause mkdir() to always return a
permissions error, even though the directory in question was actually
succesfully created.

Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
Acked-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] nfsd4: fix open-create permissions</title>
<updated>2006-11-09T02:29:23Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2006-11-09T01:44:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81ac95c5569d7a60ab5db6c1ccec56c12b3ebcb5'/>
<id>urn:sha1:81ac95c5569d7a60ab5db6c1ccec56c12b3ebcb5</id>
<content type='text'>
In the case where an open creates the file, we shouldn't be rechecking
permissions to open the file; the open succeeds regardless of what the new
file's mode bits say.

This patch fixes the problem, but only by introducing yet another parameter
to nfsd_create_v3.  This is ugly.  This will be fixed by later patches.

Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
Acked-by: Neil Brown &lt;neilb@suse.de&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] nfsd4: reindent do_open_lookup()</title>
<updated>2006-11-09T02:29:22Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2006-11-09T01:44:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af85852de0b32d92b14295aa6f5ba3a9ad044cf6'/>
<id>urn:sha1:af85852de0b32d92b14295aa6f5ba3a9ad044cf6</id>
<content type='text'>
Minor rearrangement, cleanup of do_open_lookup().  No change in behavior.

Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
Acked-by: Neil Brown &lt;neilb@suse.de&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] NFS4: fix for recursive locking problem</title>
<updated>2006-11-03T20:27:57Z</updated>
<author>
<name>Srinivasa Ds</name>
</author>
<published>2006-11-03T06:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ef55b8a05c02db7c07d81827c69fe8f124e8654'/>
<id>urn:sha1:7ef55b8a05c02db7c07d81827c69fe8f124e8654</id>
<content type='text'>
When I was performing some operations on NFS, I got below error on server
side.

  =============================================
  [ INFO: possible recursive locking detected ]
  2.6.19-prep #1
  ---------------------------------------------
  nfsd4/3525 is trying to acquire lock:
   (&amp;inode-&gt;i_mutex){--..}, at: [&lt;c0611e5a&gt;] mutex_lock+0x21/0x24

  but task is already holding lock:
   (&amp;inode-&gt;i_mutex){--..}, at: [&lt;c0611e5a&gt;] mutex_lock+0x21/0x24

  other info that might help us debug this:
  2 locks held by nfsd4/3525:
   #0:  (client_mutex){--..}, at: [&lt;c0611e5a&gt;] mutex_lock+0x21/0x24
   #1:  (&amp;inode-&gt;i_mutex){--..}, at: [&lt;c0611e5a&gt;] mutex_lock+0x21/0x24

  stack backtrace:
   [&lt;c04051ed&gt;] show_trace_log_lvl+0x58/0x16a
   [&lt;c04057fa&gt;] show_trace+0xd/0x10
   [&lt;c0405913&gt;] dump_stack+0x19/0x1b
   [&lt;c043b6f1&gt;] __lock_acquire+0x778/0x99c
   [&lt;c043be86&gt;] lock_acquire+0x4b/0x6d
   [&lt;c0611ceb&gt;] __mutex_lock_slowpath+0xbc/0x20a
   [&lt;c0611e5a&gt;] mutex_lock+0x21/0x24
   [&lt;c047fd7e&gt;] vfs_rmdir+0x76/0xf8
   [&lt;f94b7ce9&gt;] nfsd4_clear_clid_dir+0x2c/0x41 [nfsd]
   [&lt;f94b7de9&gt;] nfsd4_remove_clid_dir+0xb1/0xe8 [nfsd]
   [&lt;f94b307b&gt;] laundromat_main+0x9b/0x1c3 [nfsd]
   [&lt;c04333d6&gt;] run_workqueue+0x7a/0xbb
   [&lt;c0433d0b&gt;] worker_thread+0xd2/0x107
   [&lt;c0436285&gt;] kthread+0xc3/0xf2
   [&lt;c0402005&gt;] kernel_thread_helper+0x5/0xb
  ===================================================================

Cause for this problem was,2 successive mutex_lock calls on 2 diffrent inodes ,as shown below

	static int
	nfsd4_clear_clid_dir(struct dentry *dir, struct dentry *dentry)
	{
	        int status;

	        /* For now this directory should already be empty, but we empty it of
        	 * any regular files anyway, just in case the directory was created by
	         * a kernel from the future.... */
        	nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file);
	        mutex_lock(&amp;dir-&gt;d_inode-&gt;i_mutex);
	        status = vfs_rmdir(dir-&gt;d_inode, dentry);
	...

	int vfs_rmdir(struct inode *dir, struct dentry *dentry)
	{
	        int error = may_delete(dir, dentry, 1);

	        if (error)
	                return error;

	        if (!dir-&gt;i_op || !dir-&gt;i_op-&gt;rmdir)
        	        return -EPERM;

	        DQUOT_INIT(dir);

	        mutex_lock(&amp;dentry-&gt;d_inode-&gt;i_mutex);
	...

So I have developed the patch to overcome this problem.

Signed-off-by: Srinivasa DS &lt;srinivasa@in.ibm.com&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] nfsd: nfs_replay_me</title>
<updated>2006-10-20T17:26:43Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2006-10-20T06:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a90b061c0bf712961cea40d9c916b300073d12e5'/>
<id>urn:sha1:a90b061c0bf712961cea40d9c916b300073d12e5</id>
<content type='text'>
We are using NFS_REPLAY_ME as a special error value that is never leaked to
clients.  That works fine; the only problem is mixing host- and network-
endian values in the same objects.  Network-endian equivalent would work just
as fine; switch to it.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Acked-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
