On Mon, Jul 18, 2005 at 01:50:33PM -0400, jaegert wrote:
>
> @@ -190,8 +191,9 @@ void *flow_cache_lookup(struct flowi *ke
>                       if (fle->genid == atomic_read(&flow_cache_genid)) {
>                               void *ret = fle->object;
>  
> -                             if (ret)
> +                             if (ret && (authorizer(sk, ret, key, dir) == 0))
>                                       atomic_inc(fle->object_ref);
> +
>                               local_bh_enable();
>  
>                               return ret;

Sorry, but I don't see how this can work.  If the authorizer call fails,
we still return that object, albeit without the reference count.

We need to ponder this a bit more.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to