1
linux/fs/lockd
Chuck Lever a8d82d9b95 NLM: client-side nlm_lookup_host() should avoid matching on srcaddr
Since commit c98451bd, the loop in nlm_lookup_host() unconditionally
compares the host's h_srcaddr field to the incoming source address.
For client-side nlm_host entries, both are always AF_UNSPEC, so this
check is unnecessary.

Since commit 781b61a6, which added support for AF_INET6 addresses to
nlm_cmp_addr(), nlm_cmp_addr() now returns FALSE for AF_UNSPEC
addresses, which causes nlm_lookup_host() to create a fresh nlm_host
entry every time it is called on the client.

These extra entries will eventually expire once the server is
unmounted, so the impact of this regression, introduced with lockd
IPv6 support in 2.6.28, should be minor.

We could fix this by adding an arm in nlm_cmp_addr() for AF_UNSPEC
addresses, but really, nlm_lookup_host() shouldn't be matching on the
srcaddr field for client-side nlm_host lookups.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-11-24 13:29:07 -06:00
..
clntlock.c NLM: Remove "proto" argument from lockd_up() 2008-10-04 17:12:27 -04:00
clntproc.c lockd: dont return EAGAIN for a permanent error 2008-07-25 10:53:47 -07:00
grace.c nfsd: common grace period control 2008-10-03 16:19:02 -04:00
host.c NLM: client-side nlm_lookup_host() should avoid matching on srcaddr 2008-11-24 13:29:07 -06:00
Makefile nfsd: common grace period control 2008-10-03 16:19:02 -04:00
mon.c NSM: Use sockaddr_storage for sm_addr field 2008-09-29 18:13:39 -04:00
svc4proc.c NLM: Set address family before calling nlm_host_rebooted() 2008-10-30 17:19:30 -04:00
svc.c nfsd: clean up grace period on early exit 2008-11-24 10:12:48 -06:00
svclock.c lockd: reject reclaims outside the grace period 2008-10-03 16:19:20 -04:00
svcproc.c NLM: Set address family before calling nlm_host_rebooted() 2008-10-30 17:19:30 -04:00
svcshare.c lockd: fix sparse warning in svcshare.c 2008-04-23 16:13:39 -04:00
svcsubs.c lockd: Teach nlm_cmp_addr() to support AF_INET6 addresses 2008-09-29 18:13:39 -04:00
xdr4.c lockd: Remove unused fields in the nlm_reboot structure 2008-10-03 17:02:35 -04:00
xdr.c lockd: Remove unused fields in the nlm_reboot structure 2008-10-03 17:02:35 -04:00