<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/lockd, branch linux-2.6.29.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-2.6.29.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-2.6.29.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2009-05-18T23:35:15+00:00</updated>
<entry>
<title>lockd: fix list corruption on lockd restart</title>
<updated>2009-05-18T23:35:15+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@citi.umich.edu</email>
</author>
<published>2009-05-06T20:32:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7388d0bb77dd8b7dd2a2f88f0e0042329cd33752'/>
<id>urn:sha1:7388d0bb77dd8b7dd2a2f88f0e0042329cd33752</id>
<content type='text'>
commit 89996df4b5b1a09c279f50b3fd03aa9df735f5cb upstream.

If lockd is signalled soon enough after restart then locks_start_grace()
will try to re-add an entry to a list and trigger a lock corruption
warning.

Thanks to Wang Chen for the problem report and diagnosis.

WARNING: at lib/list_debug.c:26 __list_add+0x27/0x5c()
...
list_add corruption. next-&gt;prev should be prev (ef8fe958), but was ef8ff128.  (next=ef8ff128).
...
Pid: 23062, comm: lockd Tainted: G        W  2.6.30-rc2 #3
Call Trace:
[&lt;c042d5b5&gt;] warn_slowpath+0x71/0xa0
[&lt;c0422a96&gt;] ? update_curr+0x11d/0x125
[&lt;c044b12d&gt;] ? trace_hardirqs_on_caller+0x18/0x150
[&lt;c044b270&gt;] ? trace_hardirqs_on+0xb/0xd
[&lt;c051c61a&gt;] ? _raw_spin_lock+0x53/0xfa
[&lt;c051c89f&gt;] __list_add+0x27/0x5c
[&lt;ef8f6daa&gt;] locks_start_grace+0x22/0x30 [lockd]
[&lt;ef8f34da&gt;] set_grace_period+0x39/0x53 [lockd]
[&lt;c06b8921&gt;] ? lock_kernel+0x1c/0x28
[&lt;ef8f3558&gt;] lockd+0x64/0x164 [lockd]
[&lt;c044b12d&gt;] ? trace_hardirqs_on_caller+0x18/0x150
[&lt;c04227b0&gt;] ? complete+0x34/0x3e
[&lt;ef8f34f4&gt;] ? lockd+0x0/0x164 [lockd]
[&lt;ef8f34f4&gt;] ? lockd+0x0/0x164 [lockd]
[&lt;c043dd42&gt;] kthread+0x45/0x6b
[&lt;c043dcfd&gt;] ? kthread+0x0/0x6b
[&lt;c0403c23&gt;] kernel_thread_helper+0x7/0x10

Reported-by: Wang Chen &lt;wangchen@cn.fujitsu.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>NLM: Fix GRANT callback address comparison when IPv6 is enabled</title>
<updated>2009-03-11T00:33:20+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2009-03-11T00:33:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=57df675c60c5cf0748ddba9c7f85afde1530d74d'/>
<id>urn:sha1:57df675c60c5cf0748ddba9c7f85afde1530d74d</id>
<content type='text'>
The NFS mount command may pass an AF_INET server address to lockd.  If
lockd happens to be using a PF_INET6 listener, the nlm_cmp_addr() in
nlmclnt_grant() will fail to match requests from that host because they
will all have a mapped IPv4 AF_INET6 address.

Adopt the same solution used in nfs_sockaddr_match_ipaddr() for NFSv4
callbacks: if either address is AF_INET, map it to an AF_INET6 address
before doing the comparison.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>lockd: fix regression in lockd's handling of blocked locks</title>
<updated>2009-02-09T18:19:46+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@citi.umich.edu</email>
</author>
<published>2009-02-04T22:35:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9d9b87c1218be78ddecbc85ec3bb91c79c1d56ab'/>
<id>urn:sha1:9d9b87c1218be78ddecbc85ec3bb91c79c1d56ab</id>
<content type='text'>
If a client requests a blocking lock, is denied, then requests it again,
then here in nlmsvc_lock() we will call vfs_lock_file() without FL_SLEEP
set, because we've already queued a block and don't need the locks code
to do it again.

But that means vfs_lock_file() will return -EAGAIN instead of
FILE_LOCK_DENIED.  So we still need to translate that -EAGAIN return
into a nlm_lck_blocked error in this case, and put ourselves back on
lockd's block list.

The bug was introduced by bde74e4bc64415b1 "locks: add special return
value for asynchronous locks".

Thanks to Frank van Maarseveen for the report; his original test
case was essentially

	for i in `seq 30`; do flock /nfsmount/foo sleep 10 &amp; done

Tested-by: Frank van Maarseveen &lt;frankvm@frankvm.com&gt;
Reported-by: Frank van Maarseveen &lt;frankvm@frankvm.com&gt;
Cc: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
</content>
</entry>
<entry>
<title>NLM: Clean up flow of control in make_socks() function</title>
<updated>2009-01-07T20:40:44+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2008-12-31T21:06:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0dba7c2a9ed3d4a1e58f5d94fffa9f44dbe012e6'/>
<id>urn:sha1:0dba7c2a9ed3d4a1e58f5d94fffa9f44dbe012e6</id>
<content type='text'>
Clean up: Use Bruce's preferred control flow style in make_socks().

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
</content>
</entry>
<entry>
<title>NLM: Refactor make_socks() function</title>
<updated>2009-01-07T20:40:44+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2008-12-31T21:06:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d3fe5ea7cf815c037c90b1f1464ffc1ab5e8601b'/>
<id>urn:sha1:d3fe5ea7cf815c037c90b1f1464ffc1ab5e8601b</id>
<content type='text'>
Clean up: extract common logic in NLM's make_socks() function
into a helper.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
</content>
</entry>
<entry>
<title>lockd: Enable NLM use of AF_INET6</title>
<updated>2009-01-06T16:53:56+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2008-12-11T22:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b064ec038a6180b13e5f89b6a30b42cb5ce8febc'/>
<id>urn:sha1:b064ec038a6180b13e5f89b6a30b42cb5ce8febc</id>
<content type='text'>
If the kernel is configured to support IPv6 and the RPC server can register
services via rpcbindv4, we are all set to enable IPv6 support for lockd.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Cc: Aime Le Rouzic &lt;aime.le-rouzic@bull.net&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
</content>
</entry>
<entry>
<title>NSM: Move nsm_create()</title>
<updated>2009-01-06T16:53:56+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2008-12-11T22:56:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=49b5699b3fc22b363534c509c1b7dba06bc677bf'/>
<id>urn:sha1:49b5699b3fc22b363534c509c1b7dba06bc677bf</id>
<content type='text'>
Clean up: one last thing... relocate nsm_create() to eliminate the forward
declaration and group it near the only function that actually uses it.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
</content>
</entry>
<entry>
<title>NSM: Move nsm_use_hostnames to mon.c</title>
<updated>2009-01-06T16:53:55+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2008-12-11T22:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b7ba597fb964dfa44284904b3b3d74d44b8e1c42'/>
<id>urn:sha1:b7ba597fb964dfa44284904b3b3d74d44b8e1c42</id>
<content type='text'>
Clean up.

Treat the nsm_use_hostnames global variable like nsm_local_state.
Note that the default value of nsm_use_hostnames is still zero.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
</content>
</entry>
<entry>
<title>NSM: Move nsm_addr() to fs/lockd/mon.c</title>
<updated>2009-01-06T16:53:55+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2008-12-11T22:56:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8529bc51d30b8f001734b29b21a51b579c260f5b'/>
<id>urn:sha1:8529bc51d30b8f001734b29b21a51b579c260f5b</id>
<content type='text'>
Clean up: nsm_addr_in() is no longer used, and nsm_addr() is used only in
fs/lockd/mon.c, so move it there.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
</content>
</entry>
<entry>
<title>NSM: Remove include/linux/lockd/sm_inter.h</title>
<updated>2009-01-06T16:53:55+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2008-12-11T22:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e6765b83977f07983c7a10e6bbb19d6c7bbfc3a4'/>
<id>urn:sha1:e6765b83977f07983c7a10e6bbb19d6c7bbfc3a4</id>
<content type='text'>
Clean up: The include/linux/lockd/sm_inter.h header is nearly empty
now.  Remove it.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
</content>
</entry>
</feed>
