]> git.hungrycats.org Git - linux/commitdiff
[PATCH] auth_domain_lookup fix
authorOlaf Kirch <okir@suse.de>
Wed, 13 Oct 2004 14:27:25 +0000 (07:27 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 13 Oct 2004 14:27:25 +0000 (07:27 -0700)
This patch makes sure that auth_domain_lookup returns NULL when it doesn't
find a matching entry, rather than the last entry in the hash chain.

Signed-off-by: Olaf Kirch <okir@suse.de>
Acked-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
net/sunrpc/svcauth.c

index 8fdeb69ff86fb758be5fb347246f5d2b53981599..d9f09e61d83c7d1368c910cd79bfc380a9effb2d 100644 (file)
@@ -183,7 +183,7 @@ auth_domain_lookup(struct auth_domain *item, int set)
        }
        /* Didn't find anything */
        if (!set)
-               goto out_noset;
+               goto out_nada;
        auth_domain_cache.entries++;
 out_set:
        set_bit(CACHE_HASHED, &item->h.flags);
@@ -193,6 +193,8 @@ out_set:
        cache_fresh(&auth_domain_cache, &item->h, item->h.expiry_time);
        cache_get(&item->h);
        return item;
+out_nada:
+       tmp = NULL;
 out_noset:
        read_unlock(&auth_domain_cache.hash_lock);
        return tmp;