Re: [PATCH 3/6] crypto/realtek: hash algorithms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Markus Stockhausen <markus.stockhausen@xxxxxx> wrote:
>
> +static int rtcr_ahash_import(struct ahash_request *areq, const void *in)
> +{
> +       const void *fexp = (const void *)fallback_export_state((void *)in);
> +       struct ahash_request *freq = fallback_request_ctx(areq);
> +       struct rtcr_ahash_req *hreq = ahash_request_ctx(areq);
> +       const struct rtcr_ahash_req *hexp = in;
> +
> +       hreq->state = hexp->state;
> +       if (hreq->state & RTCR_REQ_FB_ACT)
> +               hreq->state |= RTCR_REQ_FB_RDY;
> +
> +       if (rtcr_check_fallback(areq))
> +               return crypto_ahash_import(freq, fexp);
> +
> +       memcpy(hreq, hexp, sizeof(struct rtcr_ahash_req));
> +
> +       return 0;
> +}

What happens when you import a fallback export but rtcr_check_fallback
returns false?

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux