<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/sunrpc/cache.h, branch v3.14.68</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.14.68</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.14.68'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-08-19T13:55:01Z</updated>
<entry>
<title>sunrpc: prepare NFS for 2038</title>
<updated>2013-08-19T13:55:01Z</updated>
<author>
<name>Harshula Jayasuriya</name>
<email>harshula@redhat.com</email>
</author>
<published>2013-08-15T17:46:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2f74f972d4cc7d83408ea0c32d424edcb44887bf'/>
<id>urn:sha1:2f74f972d4cc7d83408ea0c32d424edcb44887bf</id>
<content type='text'>
1) The kernel sunrpc code needs to handle seconds since epoch
greater than 2147483647. This means functions that parse time
as an int need to handle it as time_t.

2) The kernel changes must be accompanied by userspace changes
in nfs-utils.

Signed-off-by: Harshula Jayasuriya &lt;harshula@redhat.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>net/sunrpc: xpt_auth_cache should be ignored when expired.</title>
<updated>2013-07-01T21:53:28Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-06-13T02:53:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7715cde86857d4bb40f43f1ee971cf906eaf1b9c'/>
<id>urn:sha1:7715cde86857d4bb40f43f1ee971cf906eaf1b9c</id>
<content type='text'>
commit d202cce8963d9268ff355a386e20243e8332b308
    sunrpc: never return expired entries in sunrpc_cache_lookup

moved the 'entry is expired' test from cache_check to
sunrpc_cache_lookup, so that it happened early and some races could
safely be ignored.

However the ip_map (in svcauth_unix.c) has a separate single-item
cache which allows quick lookup without locking.  An entry in this
case would not be subject to the expiry test and so could be used
well after it has expired.

This is not normally a big problem because the first time it is used
after it is expired an up-call will be scheduled to refresh the entry
(if it hasn't been scheduled already) and the old entry will then
be invalidated.  So on the second attempt to use it after it has
expired, ip_map_cached_get will discard it.

However that is subtle and not ideal, so replace the "!cache_valid"
test with "cache_is_expired".
In doing this we drop the test on the "CACHE_VALID" bit.  This is
unnecessary as the bit is never cleared, and an entry will only
be cached if the bit is set.

Reported-by: Bodo Stroesser &lt;bstroesser@ts.fujitsu.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>sunrpc/cache: ensure items removed from cache do not have pending upcalls.</title>
<updated>2013-07-01T21:53:28Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-06-13T02:53:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=013920eb5db97e99a4c30c8400f1c616e2a8b0a2'/>
<id>urn:sha1:013920eb5db97e99a4c30c8400f1c616e2a8b0a2</id>
<content type='text'>
It is possible for a race to set CACHE_PENDING after cache_clean()
has removed a cache entry from the cache.
If CACHE_PENDING is still set when the entry is finally 'put',
the cache_dequeue() will never happen and we can leak memory.

So set a new flag 'CACHE_CLEANED' when we remove something from
the cache, and don't queue any upcall if it is set.

If CACHE_PENDING is set before CACHE_CLEANED, the call that
cache_clean() makes to cache_fresh_unlocked() will free memory
as needed.  If CACHE_PENDING is set after CACHE_CLEANED, the
test in sunrpc_cache_pipe_upcall will ensure that the memory
is not allocated.

Reported-by: &lt;bstroesser@ts.fujitsu.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: remove "cache_request" argument in sunrpc_cache_pipe_upcall() function</title>
<updated>2013-02-15T15:43:47Z</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2013-02-04T11:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=21cd1254d3402a72927ed744e8ac1a7cf532f1ea'/>
<id>urn:sha1:21cd1254d3402a72927ed744e8ac1a7cf532f1ea</id>
<content type='text'>
Passing this pointer is redundant since it's stored on cache_detail structure,
which is also passed to sunrpc_cache_pipe_upcall () function.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: introduce cache_detail-&gt;cache_request callback</title>
<updated>2013-02-15T15:43:45Z</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2013-02-04T11:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=73fb847a44224d5708550e4be7baba9da75e00af'/>
<id>urn:sha1:73fb847a44224d5708550e4be7baba9da75e00af</id>
<content type='text'>
This callback will allow to simplify upcalls in further patches in this
series.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>svcrpc: Revert "sunrpc/cache.h: replace simple_strtoul"</title>
<updated>2012-11-15T12:40:32Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2012-11-14T15:48:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=621eb19ce1ec216e03ad354cb0c4061736b2a436'/>
<id>urn:sha1:621eb19ce1ec216e03ad354cb0c4061736b2a436</id>
<content type='text'>
Commit bbf43dc888833ac0539e437dbaeb28bfd4fbab9f "sunrpc/cache.h: replace
simple_strtoul" introduced new range-checking which could cause get_int
to fail on unsigned integers too large to be represented as an int.

We could parse them as unsigned instead--but it turns out svcgssd is
actually passing down "-1" in some cases.  Which is perhaps stupid, but
there's nothing we can do about it now.

So just revert back to the previous "sloppy" behavior that accepts
either representation.

Cc: stable@vger.kernel.org
Reported-by: Sven Geggus &lt;lists@fuchsschwanzdomain.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: add get_uint for u32's</title>
<updated>2012-07-25T13:18:27Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2012-06-12T20:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a007c4c3e943ecc054a806c259d95420a188754b'/>
<id>urn:sha1:a007c4c3e943ecc054a806c259d95420a188754b</id>
<content type='text'>
I don't think there's a practical difference for the range of values
these interfaces should see, but it would be safer to be unambiguous.

Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>sunrpc/cache.h: replace simple_strtoul</title>
<updated>2012-07-11T20:08:00Z</updated>
<author>
<name>Eldad Zack</name>
<email>eldad@fogrefinery.com</email>
</author>
<published>2012-07-06T19:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bbf43dc888833ac0539e437dbaeb28bfd4fbab9f'/>
<id>urn:sha1:bbf43dc888833ac0539e437dbaeb28bfd4fbab9f</id>
<content type='text'>
This patch replaces the usage of simple_strtoul with kstrtoint in
get_int(), since the simple_str* family doesn't account for overflow
and is deprecated.
Also, in this specific case, the long from strtol is silently converted
to an int by the caller.

As Joe Perches &lt;joe@perches.com&gt; suggested, this patch also removes
the redundant temporary variable rv, since kstrtoint() will not write to
anint unless it's successful.

Cc: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>sunrpc/cache.h: fix coding style</title>
<updated>2012-07-11T20:07:59Z</updated>
<author>
<name>Eldad Zack</name>
<email>eldad@fogrefinery.com</email>
</author>
<published>2012-07-06T19:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d9c2ede63c74048dfddbb129c59ac01176b0ab71'/>
<id>urn:sha1:d9c2ede63c74048dfddbb129c59ac01176b0ab71</id>
<content type='text'>
Neaten code style in get_int().
Also use sizeof() instead of hard coded number as suggested by
Joe Perches &lt;joe@perches.com&gt;.

Cc: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: generic cache register routines removed</title>
<updated>2012-02-01T00:28:16Z</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2012-01-19T17:42:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2c5f846747526e2b83c5f1b8e69016be0e2e87c0'/>
<id>urn:sha1:2c5f846747526e2b83c5f1b8e69016be0e2e87c0</id>
<content type='text'>
All cache users now uses network-namespace-aware routines, so generic ones
are obsolete.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Acked-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
</feed>
