<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sunrpc, branch linux-2.6.27.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-02-11T14:38:28Z</updated>
<entry>
<title>svcrpc: fix double-free on shutdown of nfsd after changing pool mode</title>
<updated>2012-02-11T14:38:28Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2011-12-23T01:22:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b57fdc838c5af0c587e36b03050ea4c98344b8ac'/>
<id>urn:sha1:b57fdc838c5af0c587e36b03050ea4c98344b8ac</id>
<content type='text'>
commit 61c8504c428edcebf23b97775a129c5b393a302b upstream.

The pool_to and to_pool fields of the global svc_pool_map are freed on
shutdown, but are initialized in nfsd startup only in the
SVC_POOL_PERCPU and SVC_POOL_PERNODE cases.

They *are* initialized to zero on kernel startup.  So as long as you use
only SVC_POOL_GLOBAL (the default), this will never be a problem.

You're also OK if you only ever use SVC_POOL_PERCPU or SVC_POOL_PERNODE.

However, the following sequence events leads to a double-free:

	1. set SVC_POOL_PERCPU or SVC_POOL_PERNODE
	2. start nfsd: both fields are initialized.
	3. shutdown nfsd: both fields are freed.
	4. set SVC_POOL_GLOBAL
	5. start nfsd: the fields are left untouched.
	6. shutdown nfsd: now we try to free them again.

Step 4 is actually unnecessary, since (for some bizarre reason), nfsd
automatically resets the pool mode to SVC_POOL_GLOBAL on shutdown.

Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>NLM: Don't hang forever on NLM unlock requests</title>
<updated>2012-02-11T14:37:49Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2011-05-31T19:15:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c5a7be322b548f42a36b7c738cc52205beb42d6'/>
<id>urn:sha1:6c5a7be322b548f42a36b7c738cc52205beb42d6</id>
<content type='text'>
commit 0b760113a3a155269a3fba93a409c640031dd68f upstream.

If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.

Tested-by: Vasily Averin &lt;vvs@sw.ru&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>svcrpc: fix list-corrupting race on nfsd shutdown</title>
<updated>2012-02-11T14:37:37Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2011-06-29T20:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c21fda2a530ae79bed0696798b1f2397577eda78'/>
<id>urn:sha1:c21fda2a530ae79bed0696798b1f2397577eda78</id>
<content type='text'>
commit ebc63e531cc6a457595dd110b07ac530eae788c3 upstream.

After commit 3262c816a3d7fb1eaabce633caa317887ed549ae "[PATCH] knfsd:
split svc_serv into pools", svc_delete_xprt (then svc_delete_socket) no
longer removed its xpt_ready (then sk_ready) field from whatever list it
was on, noting that there was no point since the whole list was about to
be destroyed anyway.

That was mostly true, but forgot that a few svc_xprt_enqueue()'s might
still be hanging around playing with the about-to-be-destroyed list, and
could get themselves into trouble writing to freed memory if we left
this xprt on the list after freeing it.

(This is actually functionally identical to a patch made first by Ben
Greear, but with more comments.)

Cc: gnb@fmeh.org
Reported-by: Ben Greear &lt;greearb@candelatech.com&gt;
Tested-by: Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Fix use of static variable in rpcb_getport_async</title>
<updated>2012-02-11T14:37:33Z</updated>
<author>
<name>Ben Greear</name>
</author>
<published>2011-07-12T17:27:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=579c0020854711ed64201d40519a368c8b1f61b1'/>
<id>urn:sha1:579c0020854711ed64201d40519a368c8b1f61b1</id>
<content type='text'>
commit ec0dd267bf7d08cb30e321e45a75fd40edd7e528 upstream.

Because struct rpcbind_args *map was declared static, if two
threads entered this method at the same time, the values
assigned to map could be sent two two differen tasks.
This could cause all sorts of problems, include use-after-free
and double-free of memory.

Fix this by removing the static declaration so that the map
pointer is on the stack.

Signed-off-by: Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>SUNRPC: fix NFS client over TCP hangs due to packet loss (Bug 16494)</title>
<updated>2012-02-11T14:37:22Z</updated>
<author>
<name>Andy Chittenden</name>
</author>
<published>2010-08-10T14:19:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ea3fe6ab5b1fe7f2ee5f1edc401b5305df5d138'/>
<id>urn:sha1:3ea3fe6ab5b1fe7f2ee5f1edc401b5305df5d138</id>
<content type='text'>
commit 669502ff31d7dba1849aec7ee2450a3c61f57d39 upstream.

When reusing a TCP connection, ensure that it's aborted if a previous
shutdown attempt has been made on that connection so that the RPC over
TCP recovery mechanism succeeds.

Signed-off-by: Andy Chittenden &lt;andyc.bluearc@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Ensure we always run the tk_callback before tk_action</title>
<updated>2011-04-30T14:53:18Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2011-03-15T23:56:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bcd1bb8ba9c81477d2684888facd76ff287611b'/>
<id>urn:sha1:9bcd1bb8ba9c81477d2684888facd76ff287611b</id>
<content type='text'>
commit e020c6800c9621a77223bf2c1ff68180e41e8ebf upstream.

This fixes a race in which the task-&gt;tk_callback() puts the rpc_task
to sleep, setting a new callback. Under certain circumstances, the current
code may end up executing the task-&gt;tk_action before it gets round to the
callback.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sunrpc/cache: fix module refcnt leak in a failure path</title>
<updated>2011-04-30T14:53:05Z</updated>
<author>
<name>Li Zefan</name>
</author>
<published>2010-03-11T22:08:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3551c1c874fbc3a576ffc88541f686422d18c21'/>
<id>urn:sha1:a3551c1c874fbc3a576ffc88541f686422d18c21</id>
<content type='text'>
commit a5990ea1254cd186b38744507aeec3136a0c1c95 upstream.

Don't forget to release the module refcnt if seq_open() returns failure.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Cc: J. Bruce Fields &lt;bfields@fieldses.org&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
Cc: maximilian attems &lt;max@stro.at&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sunrpc: prevent use-after-free on clearing XPT_BUSY</title>
<updated>2011-02-09T21:15:38Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2010-11-16T05:55:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=346ecec0ebc9c048df93f3b710716407120c8267'/>
<id>urn:sha1:346ecec0ebc9c048df93f3b710716407120c8267</id>
<content type='text'>
commit ed2849d3ecfa339435818eeff28f6c3424300cec upstream.

When an xprt is created, it has a refcount of 1, and XPT_BUSY is set.
The refcount is *not* owned by the thread that created the xprt
(as is clear from the fact that creators never put the reference).
Rather, it is owned by the absence of XPT_DEAD.  Once XPT_DEAD is set,
(And XPT_BUSY is clear) that initial reference is dropped and the xprt
can be freed.

So when a creator clears XPT_BUSY it is dropping its only reference and
so must not touch the xprt again.

However svc_recv, after calling -&gt;xpo_accept (and so getting an XPT_BUSY
reference on a new xprt), calls svc_xprt_recieved.  This clears
XPT_BUSY and then svc_xprt_enqueue - this last without owning a reference.
This is dangerous and has been seen to leave svc_xprt_enqueue working
with an xprt containing garbage.

So we need to hold an extra counted reference over that call to
svc_xprt_received.

For safety, any time we clear XPT_BUSY and then use the xprt again, we
first get a reference, and the put it again afterwards.

Note that svc_close_all does not need this extra protection as there are
no threads running, and the final free can only be called asynchronously
from such a thread.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

</content>
</entry>
<entry>
<title>svc: Clean up deferred requests on transport destruction</title>
<updated>2010-05-26T21:27:08Z</updated>
<author>
<name>Tom Tucker</name>
</author>
<published>2009-01-05T21:21:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=60f30297ff9403dec857f23292bc82ecdc5b4a57'/>
<id>urn:sha1:60f30297ff9403dec857f23292bc82ecdc5b4a57</id>
<content type='text'>
commit 22945e4a1c7454c97f5d8aee1ef526c83fef3223 upstream.

A race between svc_revisit and svc_delete_xprt can result in
deferred requests holding references on a transport that can never be
recovered because dead transports are not enqueued for subsequent
processing.

Check for XPT_DEAD in revisit to clean up completing deferrals on a dead
transport and sweep a transport's deferred queue to do the same for queued
but unprocessed deferrals.

Signed-off-by: Tom Tucker &lt;tom@opengridcomputing.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
Cc: roma1390 &lt;roma1390@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>SUNRPC: Fix tcp reconnection</title>
<updated>2009-09-09T03:17:51Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2009-08-21T17:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2607b3b8c16b95806c81968bcd909cba02e6d051'/>
<id>urn:sha1:2607b3b8c16b95806c81968bcd909cba02e6d051</id>
<content type='text'>
This fixes a problem that was reported as Red Hat Bugzilla entry number
485339, in which rpciod starts looping on the TCP connection code,
rendering the NFS client unusable for 1/2 minute or so.

It is basically a backport of commit
f75e6745aa3084124ae1434fd7629853bdaf6798 (SUNRPC: Fix the problem of
EADDRNOTAVAIL syslog floods on reconnect)

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
</feed>
