<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/sunrpc/cache.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/sunrpc/cache.c?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/sunrpc/cache.c?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-08-06T15:57:47Z</updated>
<entry>
<title>[PATCH] knfsd: fix race related problem when adding items to and svcrpc auth cache</title>
<updated>2006-08-06T15:57:47Z</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-08-05T19:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2f34931fdc78b4895553aaa33748939cc7697c99'/>
<id>urn:sha1:2f34931fdc78b4895553aaa33748939cc7697c99</id>
<content type='text'>
If we don't find the item we are lookng for, we allocate a new one, and
then grab the lock again and search to see if it has been added while we
did the alloc.  If it had been added we need to 'cache_put' the newly
created item that we are never going to use.  But as it hasn't been
initialised properly, putting it can cause an oops.

So move the -&gt;init call earlier to that it will always be fully initilised
if we have to put it.

Thanks to Philipp Matthias Hahn &lt;pmhahn@svs.Informatik.Uni-Oldenburg.de&gt;
for reporting the problem.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Cc: &lt;stable@kernel.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] knfsd: Fix two problems that can cause rmmod nfsd to die</title>
<updated>2006-05-23T17:35:31Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-05-23T05:35:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f2d395865faa2a7cd4620b07178e58cbb160ba08'/>
<id>urn:sha1:f2d395865faa2a7cd4620b07178e58cbb160ba08</id>
<content type='text'>
Both cause the 'entries' count in the export cache to be non-zero at module
removal time, so unregistering that cache fails and results in an oops.

1/ exp_pseudoroot (used for NFSv4 only) leaks a reference to an export
   entry.
2/ sunrpc_cache_update doesn't increment the entries count when it adds
   an entry.

Thanks to "david m.  richter" &lt;richterd@citi.umich.edu&gt; for triggering the
problem and finding one of the bugs.

Cc: "david m. richter" &lt;richterd@citi.umich.edu&gt;
Signed-off-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>
<entry>
<title>[PATCH] fs/nfsd/export.c,net/sunrpc/cache.c: make needlessly global code static</title>
<updated>2006-03-27T16:44:43Z</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@stusta.de</email>
</author>
<published>2006-03-27T09:15:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=74cae61ab45f19a3e8c4d9f53c0e94df129c7915'/>
<id>urn:sha1:74cae61ab45f19a3e8c4d9f53c0e94df129c7915</id>
<content type='text'>
We can now make some code static.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&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] knfsd: Convert sunrpc_cache to use krefs</title>
<updated>2006-03-27T16:44:43Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-03-27T09:15:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=baab935ff3bdac20c558809da0d8e8f761840219'/>
<id>urn:sha1:baab935ff3bdac20c558809da0d8e8f761840219</id>
<content type='text'>
.. it makes some of the code nicer.

Signed-off-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>
<entry>
<title>[PATCH] knfsd: Unexport cache_fresh and fix a small race</title>
<updated>2006-03-27T16:44:43Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-03-27T09:15:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ebd0cb1af3be2729cc1f574681dfba01fcf458d9'/>
<id>urn:sha1:ebd0cb1af3be2729cc1f574681dfba01fcf458d9</id>
<content type='text'>
Cache_fresh is now only used in cache.c, so unexport it.

Part of cache_fresh (setting CACHE_VALID) should really be done under the
lock, while part (calling cache_revisit_request etc) must be done outside the
lock.  So we split it up appropriately.

Signed-off-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>
<entry>
<title>[PATCH] knfsd: An assortment of little fixes to the sunrpc cache code</title>
<updated>2006-03-27T16:44:42Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-03-27T09:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4013edea9a0b6cdcb1fdf5d4011e47e068fd6efb'/>
<id>urn:sha1:4013edea9a0b6cdcb1fdf5d4011e47e068fd6efb</id>
<content type='text'>
- in cache_check, h must be non-NULL as it has been de-referenced,
  so don't bother checking for NULL.

- When a cache-item is updated, we need to call cache_revisit_request to see
  if there is a pending request waiting for that item.  We were using
  a transition to CACHE_VALID to see if that was needed, however that is
  wrong as an expired entry will still be marked 'valid' (as the data is valid
  and will need to be released).  So instead use an off transition for
  CACHE_PENDING which is exactly the right thing to test.

- Add a little bit more debugging info.

Signed-off-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>
<entry>
<title>[PATCH] knfsd: Create cache_lookup function instead of using a macro to declare one</title>
<updated>2006-03-27T16:44:41Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-03-27T09:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=15a5f6bd23eddd5b3be80366f364be04fb1c1c99'/>
<id>urn:sha1:15a5f6bd23eddd5b3be80366f364be04fb1c1c99</id>
<content type='text'>
The C++-like 'template' approach proves to be too ugly and hard to work with.

The old 'template' won't go away until all users are updated.

Signed-off-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>
<entry>
<title>[NET] sem2mutex: net/</title>
<updated>2006-03-21T06:33:17Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@infradead.org</email>
</author>
<published>2006-03-21T06:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4a3e2f711a00a1feb72ae12fdc749da10179d185'/>
<id>urn:sha1:4a3e2f711a00a1feb72ae12fdc749da10179d185</id>
<content type='text'>
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Change some "if (x) BUG();" to "BUG_ON(x);"</title>
<updated>2006-01-09T22:16:18Z</updated>
<author>
<name>Kris Katterjohn</name>
<email>kjak@users.sourceforge.net</email>
</author>
<published>2006-01-09T06:24:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09a626600b437d91f6b13ade5c7c4b374893c54e'/>
<id>urn:sha1:09a626600b437d91f6b13ade5c7c4b374893c54e</id>
<content type='text'>
This changes some simple "if (x) BUG();" statements to "BUG_ON(x);"

Signed-off-by: Kris Katterjohn &lt;kjak@users.sourceforge.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[PATCH] sunrpc: cache_register can use wrong module reference</title>
<updated>2005-09-07T23:57:25Z</updated>
<author>
<name>Bruce Allan</name>
<email>bwa@us.ibm.com</email>
</author>
<published>2005-09-06T22:17:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f35279d3f713e5c97b98cbdbf47d98f79942c11f'/>
<id>urn:sha1:f35279d3f713e5c97b98cbdbf47d98f79942c11f</id>
<content type='text'>
When registering an RPC cache, cache_register() always sets the owner as the
sunrpc module.  However, there are RPC caches owned by other modules.  With
the incorrect owner setting, the real owning module can be removed potentially
with an open reference to the cache from userspace.

For example, if one were to stop the nfs server and unmount the nfsd
filesystem, the nfsd module could be removed eventhough rpc.idmapd had
references to the idtoname and nametoid caches (i.e.
/proc/net/rpc/nfs4.&lt;cachename&gt;/channel is still open).  This resulted in a
system panic on one of our machines when attempting to restart the nfs
services after reloading the nfsd module.

The following patch adds a 'struct module *owner' field in struct
cache_detail.  The owner is further assigned to the struct proc_dir_entry
in cache_register() so that the module cannot be unloaded while user-space
daemons have an open reference on the associated file under /proc.

Signed-off-by: Bruce Allan &lt;bwa@us.ibm.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Cc: Neil Brown &lt;neilb@cse.unsw.edu.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
